Last modified: 2014-10-22 07:48:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74305, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72305 - Wikidata scripts exit with an exception when the site is not a wikibase client
Wikidata scripts exit with an exception when the site is not a wikibase client
Status: NEW
Product: Pywikibot
Classification: Unclassified
Wikidata (Other open bugs)
core-(2.0)
All All
: Unprioritized major
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-21 13:03 UTC by John Mark Vandenberg
Modified: 2014-10-22 07:48 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description John Mark Vandenberg 2014-10-21 13:03:46 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>
Comment 1 Gerrit Notification Bot 2014-10-21 13:09:59 UTC
Change 167793 had a related patch set uploaded by John Vandenberg:
Validate WikidataBot .site and .repo

https://gerrit.wikimedia.org/r/167793
Comment 2 Gerrit Notification Bot 2014-10-22 00:04:08 UTC
Change 167793 merged by XZise:
Validate WikidataBot .site and .repo

https://gerrit.wikimedia.org/r/167793
Comment 3 Ricordisamoa 2014-10-22 07:18:11 UTC
FIXED?
Comment 4 John Mark Vandenberg 2014-10-22 07:48:01 UTC
No.  The scripts now fail with a more-nice/meaningful exception, but a backtrace is not a user-friendly error message.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links