Last modified: 2014-10-17 00:32:07 UTC
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/431cb776cbdf0196b5498a98ea805e81acdf08bb/pywikibot%2Fpage.py Forgot to test downstream usage?
Looking at the code I'm afraid claimit.py and harvest_template.py are broken too because of this.
Change 161222 had a related patch set uploaded by John Vandenberg: Implement item-centric WikidataBot.run https://gerrit.wikimedia.org/r/161222
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
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>
Change 161759 merged by jenkins-bot: Fix newitem.py to instantiate a new item https://gerrit.wikimedia.org/r/161759
Fixed now?
Yup