https://bugzilla.wikimedia.org/show_bug.cgi?id=73494
Bug ID: 73494 Summary: replace.py: AttributeError: 'ReplaceRobot' object has no attribute '_sites' Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: critical Priority: Unprioritized Component: Other scripts Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: martineznovo@gmail.com CC: mpaa.wiki@gmail.com Web browser: --- Mobile Platform: ---
This morning I've updated my local copy of the repository. Was about to do some maintenance replacements and got greeted with this error:
$> python pwb.py replace.py -family:AAAAAAA -filelinks:"AAAAAAA.png" "BBBBB" "CCCCC" Traceback (most recent call last): File "pwb.py", line 181, in <module> run_python_file(fn, argv, argvu) File "pwb.py", line 75, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "scripts/replace.py", line 730, in <module> main() File "scripts/replace.py", line 719, in main allowoverlap, recursive, add_cat, sleep, edit_summary) File "scripts/replace.py", line 289, in __init__ self.site = site File ".../pywikibot/core/pywikibot/bot.py", line 1073, in site if site not in self._sites: AttributeError: 'ReplaceRobot' object has no attribute '_sites' <type 'exceptions.AttributeError'>
Since I had other tasks to do, this one wasn't urgent, I left the problem. Now I've updated the repo again to see if it has been somehow fixed, but it isn't :(
There seems to be no way to run replace.py now without this error :(
Current version is f8ad9fcd1ca2a5bba830be55cf05f475f9dbdfeb
https://bugzilla.wikimedia.org/show_bug.cgi?id=73494
Fabian CommodoreFabianus@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |CommodoreFabianus@gmx.de
--- Comment #1 from Fabian CommodoreFabianus@gmx.de --- This bug was probably introduced in https://gerrit.wikimedia.org/r/166583/ and is due to the fact that ReplaceRobot.__init__ is not calling Bot.__init__.
https://bugzilla.wikimedia.org/show_bug.cgi?id=73494
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 173674 had a related patch set uploaded by John Vandenberg: Add superclass initialisation for three Bot scripts
https://gerrit.wikimedia.org/r/173674
https://bugzilla.wikimedia.org/show_bug.cgi?id=73494
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=73494
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 173674 merged by jenkins-bot: Add superclass initialisation for three Bot scripts
https://gerrit.wikimedia.org/r/173674
https://bugzilla.wikimedia.org/show_bug.cgi?id=73494
--- Comment #4 from Jesús Martínez Novo (Ciencia Al Poder) martineznovo@gmail.com --- Now the error is a bit further:
Traceback (most recent call last): File "pwb.py", line 181, in <module> run_python_file(fn, argv, argvu) File "pwb.py", line 75, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "scripts/replace.py", line 731, in <module> main() File "scripts/replace.py", line 720, in main allowoverlap, recursive, add_cat, sleep, edit_summary) File "scripts/replace.py", line 290, in __init__ self.site = site File ".../pywikibot/core/pywikibot/bot.py", line 1075, in site % (site, unicode(site.version()))) AttributeError: 'NoneType' object has no attribute 'version' <type 'exceptions.AttributeError'>
https://bugzilla.wikimedia.org/show_bug.cgi?id=73494
--- Comment #5 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 173675 had a related patch set uploaded by John Vandenberg: Bot.site property fails when set to None
https://gerrit.wikimedia.org/r/173675
https://bugzilla.wikimedia.org/show_bug.cgi?id=73494
--- Comment #6 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 173675 merged by jenkins-bot: Bot.site property fails when set to None
https://gerrit.wikimedia.org/r/173675
https://bugzilla.wikimedia.org/show_bug.cgi?id=73494
Jesús Martínez Novo (Ciencia Al Poder) martineznovo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Normal Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED Assignee|Pywikipedia-bugs@lists.wiki |jayvdb@gmail.com |media.org |
--- Comment #7 from Jesús Martínez Novo (Ciencia Al Poder) martineznovo@gmail.com --- Fixed
pywikipedia-bugs@lists.wikimedia.org