Last modified: 2014-10-22 07:48:01 UTC
newitem fails within the script. harvest_template, coordinate_import, claimit & illustrate_wikidata fail within the WikidataBot class, method cacheSources. $ python pwb.py scripts/newitem.py -newpages Traceback (most recent call last): File "pwb.py", line 175, in <module> run_python_file(fn, argv, argvu) File "pwb.py", line 69, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "scripts/newitem.py", line 147, in <module> main() File "scripts/newitem.py", line 143, in main bot = NewItemRobot(generator, **options) File "scripts/newitem.py", line 52, in __init__ self.pageAgeBefore = self.repo.getcurrenttime() - timedelta(days=self.pageAge) AttributeError: 'NoneType' object has no attribute 'getcurrenttime' <type 'exceptions.AttributeError'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort $ python pwb.py scripts/harvest_template.py -newpages -template:noun -family:wiktionary -lang:fr Traceback (most recent call last): File "pwb.py", line 175, in <module> run_python_file(fn, argv, argvu) File "pwb.py", line 69, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "scripts/harvest_template.py", line 224, in <module> main() File "scripts/harvest_template.py", line 220, in main bot = HarvestRobot(generator, template_title, fields) File "scripts/harvest_template.py", line 61, in __init__ self.cacheSources() File ".../pywikibot/bot.py", line 1066, in cacheSources page = pywikibot.Page(self.repo, u'List of wikis/python', ns=4) File ".../pywikibot/tools.py", line 529, in wrapper return obj(*__args, **__kw) File ".../pywikibot/page.py", line 127, in __init__ % (type(source), source)) pywikibot.exceptions.Error: Invalid argument type '<type 'NoneType'>' in Page constructor: None <class 'pywikibot.exceptions.Error'> $ python pwb.py scripts/coordinate_import.py -newpages <same> <etc>
Change 167793 had a related patch set uploaded by John Vandenberg: Validate WikidataBot .site and .repo https://gerrit.wikimedia.org/r/167793
Change 167793 merged by XZise: Validate WikidataBot .site and .repo https://gerrit.wikimedia.org/r/167793
FIXED?
No. The scripts now fail with a more-nice/meaningful exception, but a backtrace is not a user-friendly error message.