https://bugzilla.wikimedia.org/show_bug.cgi?id=71095
Bug ID: 71095 Summary: newitem.py broken after page.py update Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: major Priority: Unprioritized Component: Wikidata Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: maarten@mdammers.nl CC: jayvdb@gmail.com Web browser: --- Mobile Platform: ---
I just updated to the latest git version and now newitem.py stopped working:
HSM Salamander - Phoenix <<<
Traceback (most recent call last): File "C:\pywikibot\coredev\pwb.py", line 164, in <module> run_python_file(fn, argv, argvu) File "C:\pywikibot\coredev\pwb.py", line 69, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "C:\pywikibot\coredev\scripts\newitem.py", line 141, in <module> main() File "C:\pywikibot\coredev\scripts\newitem.py", line 138, in main bot.run() File "C:\pywikibot\coredev\scripts\newitem.py", line 68, in run item = pywikibot.ItemPage.fromPage(page) File "C:\pywikibot\coredev\pywikibot\page.py", line 3156, in fromPage raise pywikibot.NoPage(i) pywikibot.exceptions.NoPage: Page [[wikidata:-1]] doesn't exist. <class 'pywikibot.exceptions.NoPage'>
The behaviour of Page.fromPage was changed: https://git.wikimedia.org/blobdiff/pywikibot%2Fcore.git/431cb776cbdf0196b549...
Forgot to test downstream usage?
https://bugzilla.wikimedia.org/show_bug.cgi?id=71095
Maarten Dammers maarten@mdammers.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Highest
--- Comment #1 from Maarten Dammers maarten@mdammers.nl --- Looking at the code I'm afraid claimit.py and harvest_template.py are broken too because of this.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71095
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=66523
https://bugzilla.wikimedia.org/show_bug.cgi?id=71095
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 161222 had a related patch set uploaded by John Vandenberg: Implement item-centric WikidataBot.run
https://gerrit.wikimedia.org/r/161222
https://bugzilla.wikimedia.org/show_bug.cgi?id=71095
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=71095
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 161759 had a related patch set uploaded by John Vandenberg: FIX newitem.py to instantiate a new item
https://gerrit.wikimedia.org/r/161759
https://bugzilla.wikimedia.org/show_bug.cgi?id=71095
JAn Dudík jan.dudik@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jan.dudik@gmail.com
--- Comment #4 from JAn Dudík jan.dudik@gmail.com --- With patch (161222) it works, but there is also one more bug: When page is created and after moved to new name without leaving redirect, bot crashes.
pbb.py -newitem -namespace:0 -lang:cs ...
Viktorin Pohl (rozcestník) <<<
ERROR: Page [[cs:Viktorin Pohl (rozcestník)]] doesn't exist. Traceback (most recent call last): File "I:\py\rewrite\pywikibot\bot.py", line 1006, in run self.treat(page, item) File "I:\py\rewrite\scripts\newitem.py", line 76, in treat if page.editTime() > self.lastEditBefore: File "I:\py\rewrite\pywikibot\page.py", line 533, in editTime rev = self.latestRevision() File "I:\py\rewrite\pywikibot\page.py", line 396, in latestRevision self.site.loadrevisions(self) File "I:\py\rewrite\pywikibot\site.py", line 2860, in loadrevisions raise NoPage(page) NoPage: Page [[cs:Viktorin Pohl (rozcestnĂk)]] doesn't exist. I:\py\rewrite>
https://bugzilla.wikimedia.org/show_bug.cgi?id=71095
--- Comment #5 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 161759 merged by jenkins-bot: Fix newitem.py to instantiate a new item
https://gerrit.wikimedia.org/r/161759
https://bugzilla.wikimedia.org/show_bug.cgi?id=71095
--- Comment #6 from Maarten Dammers maarten@mdammers.nl --- Fixed now?
https://bugzilla.wikimedia.org/show_bug.cgi?id=71095
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from John Mark Vandenberg jayvdb@gmail.com --- Yup
pywikipedia-bugs@lists.wikimedia.org