Page MenuHomePhabricator

add_text.py fails critically on Toolforge
Closed, ResolvedPublic

Description

Steps to reproduce

  1. run python3 pwb.py add_text -text:"[[Kategorie:Údržba:Články s referencemi v nadpisech]]" -summary:"Robot: reference v nadpisech" -search:'insource:/\<\/ref\> *==/ -incategory:"Údržba:Články s referencemi v nadpisech"' -ns:0 -always -family:wikipedia -lang:cs on Toolforge

Expected behavior
It should just add category to the pages.

Current behavior
Since the beginning of June this is the output I get:

0 pages read
0 pages written
0 pages skipped
Execution time: 0 seconds
Script terminated by exception:

ERROR: TypeError: super(type, obj): obj must be an instance or subtype of type
Traceback (most recent call last):
  File "pwb.py", line 399, in <module>
    if not main():
  File "pwb.py", line 394, in main
    module)
  File "pwb.py", line 109, in run_python_file
    main_mod.__dict__)
  File "./scripts/add_text.py", line 444, in <module>
    main()
  File "./scripts/add_text.py", line 395, in main
    bot.run()
  File "/mnt/nfs/labstore-secondary-tools-project/dvorapabot/pywikibot/pywikibot/bot.py", line 1510, in run
    if self.skip_page(page):
  File "./scripts/add_text.py", line 340, in skip_page
    if not page.isTalkPage() and ExistingPageBot.skip_page(self, page):
  File "/mnt/nfs/labstore-secondary-tools-project/dvorapabot/pywikibot/pywikibot/bot.py", line 1840, in skip_page
    return super().skip_page(page)
TypeError: super(type, obj): obj must be an instance or subtype of type
CRITICAL: Exiting due to uncaught exception <class 'TypeError'>

Configuration
Toolforge, Python 3.5, Pywikibot master

Event Timeline

Introduced in {2d9d42d32abed1a80833aa48aa353ec750b18864}

Change 699863 had a related patch set uploaded (by JJMC89; author: JJMC89):

[pywikibot/core@master] Revert "[IMPR] Simplify AddTextBot.skip_page"

https://gerrit.wikimedia.org/r/699863

Change 699863 merged by jenkins-bot:

[pywikibot/core@master] Revert "[IMPR] Simplify AddTextBot.skip_page"

https://gerrit.wikimedia.org/r/699863

JJMC89 claimed this task.
JJMC89 edited projects, added Pywikibot-Scripts; removed Patch-For-Review.

Change 700113 had a related patch set uploaded (by Damian; author: Damian):

[pywikibot/core@master] [IMPR] Simplify and test add_text's skip_page() method

https://gerrit.wikimedia.org/r/700113

Change 700113 merged by jenkins-bot:

[pywikibot/core@master] [IMPR] Simplify and test add_text's skip_page() method

https://gerrit.wikimedia.org/r/700113