Last modified: 2014-11-12 15:17:55 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 T68523, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66523 - harvest_template reports error when wikidata item does not exists:
harvest_template reports error when wikidata item does not exists:
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
Wikidata (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: xqt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-12 09:57 UTC by JAn Dudík
Modified: 2014-11-12 15:17 UTC (History)
3 users (show)

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


Attachments

Description JAn Dudík 2014-06-12 09:57:23 UTC
When harvesting from some category, there are sometimes new articles which have not own wikidatat item yet. 
This pages were normally skipped. 
After some changes there are now error reports which are annoying and makes terminal window hardly readable:

harvest_template -template:Commonscat "1" P373

Processing [[cs:Kostel svatého Ducha (Krupka)]]
[[cs:Kostel svateho Ducha (Krupka)]] doesn't have a wikidata item :(
ERROR: NoPage: Page [[wikidata:-1]] doesn't exist.
Traceback (most recent call last):
  File "D:\Py\rewrite\scripts\harvest_template.py", line 66, in run
    self.processPage(page)
  File "D:\Py\rewrite\scripts\harvest_template.py", line 122, in processPage
    item.get()
  File "D:\Py\rewrite\pywikibot\page.py", line 2632, in get
    super(ItemPage, self).get(force=force, *args)
  File "D:\Py\rewrite\pywikibot\page.py", line 2470, in get
    raise pywikibot.NoPage(self)
NoPage: Page [[wikidata:-1]] doesn't exist.
Comment 1 Gerrit Notification Bot 2014-06-12 11:42:05 UTC
Change 139096 had a related patch set uploaded by Xqt:
(bug 66523) Do not break script when wikidata item does not exists.

https://gerrit.wikimedia.org/r/139096
Comment 2 Gerrit Notification Bot 2014-06-12 14:04:24 UTC
Change 139096 merged by jenkins-bot:
(bug 66523) Do not break script when wikidata item does not exists.

https://gerrit.wikimedia.org/r/139096
Comment 3 JAn Dudík 2014-09-16 13:16:15 UTC
Today again, latest version of pywikibot:

pwb.py harvest_template -cat:"Údržba:Commonscat_není_na_Wikidatech" -template:"Commonscat" "1" P373
...
>>> Kostel Nanebevzeti Panny Marie (Vyskov) <<<
Adding P373 --> Church of the Assumption of the Virgin Mary (Vyskov)


ERROR: Page [[wikidata:-1]] doesn't exist.
Traceback (most recent call last):
  File "D:\Py\rewrite\scripts\harvest_template.py", line 64, in run
    self.processPage(page)
  File "D:\Py\rewrite\scripts\harvest_template.py", line 111, in processPage
    item = pywikibot.ItemPage.fromPage(page)
  File "D:\Py\rewrite\pywikibot\page.py", line 3142, in fromPage
    raise pywikibot.NoPage(i)
NoPage: Page [[wikidata:-1]] doesn't exist.
Comment 4 Gerrit Notification Bot 2014-09-18 12:14:17 UTC
Change 161222 had a related patch set uploaded by John Vandenberg:
Implement item-centric WikidataBot.run

https://gerrit.wikimedia.org/r/161222
Comment 5 John Mark Vandenberg 2014-09-18 12:46:55 UTC
Hi JAn, sorry I didnt see this bug.  It was caused by my "Support items not stored in repo"  https://gerrit.wikimedia.org/r/#/c/135410/

I've tested the fix on newitems, and the others 'should' also be fixed. Will do more testing.
Comment 6 Gerrit Notification Bot 2014-09-23 07:45:16 UTC
Change 161222 merged by jenkins-bot:
Implement item-centric WikidataBot.run

https://gerrit.wikimedia.org/r/161222
Comment 7 Andre Klapper 2014-11-12 15:12:56 UTC
All patches mentioned in this report were merged - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?
Comment 8 John Mark Vandenberg 2014-11-12 15:17:55 UTC
done

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


Navigation
Links