Page MenuHomePhabricator

mw1.24wmf18 - API problem - "entity" not exist in WBgetentities
Closed, ResolvedPublic

Description

Author: frettie

Description:
Hello,
at time of deployment new version of Wikidata files (26/08/2014) i get a "key error" Exception in PyWikiBot (wikipedia.py, line 5058) - which doesn't find key "entity" in return data from Wikimedia APi.

There is err in API (for 98 %), in minutes before this err script runs normally for 45 000 edits.

Thanks.
J.


Version: compat-(1.0)
Severity: critical

Details

Reference
bz70069

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 3:29 AM
bzimport set Reference to bz70069.
bzimport added a subscriber: Unknown Object (????).

I think the Wikidata serialization broke whatever compat was relying on.

The new system literally broke anything, I think Wikidata people should make an announcement about API output changes but it seems this change was not intentional and they are working on it to fix it ASAP, if they don't want to work on it. I will write a wrapper in pywikibot to make the output of wbgetentity the same as before.

(In reply to Kunal Mehta (Legoktm) from comment #3)

It was announced...
https://lists.wikimedia.org/pipermail/wikidata-tech/2014-August/000548.html

The format of wbgetentities wasn't changed afaik.

So It was my mistake to miss that. lots of e-mail :(
I checked it changed content that wbgetentities returns. See an example:
http://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q1700&format=json

frettie wrote:

(In reply to Amir Ladsgroup from comment #4)

(In reply to Kunal Mehta (Legoktm) from comment #3)

It was announced...
https://lists.wikimedia.org/pipermail/wikidata-tech/2014-August/000548.html

The format of wbgetentities wasn't changed afaik.

So It was my mistake to miss that. lots of e-mail :(
I checked it changed content that wbgetentities returns. See an example:
http://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q1700&format=json

I agree - in new version is lost key "entity" with "item/value" property.

gerritadmin wrote:

Change 156732 had a related patch set uploaded by John Vandenberg:
Add wrapper for new output of Wikidata

https://gerrit.wikimedia.org/r/156732

gerritadmin wrote:

Change 156732 had a related patch set uploaded by John Vandenberg:
Add wrapper for new output of Wikibase

https://gerrit.wikimedia.org/r/156732

gerritadmin wrote:

Change 156732 merged by jenkins-bot:
Add wrapper for new output of Wikibase

https://gerrit.wikimedia.org/r/156732