Closed lisongx closed 8 years ago
seems that it went error when process this prop
{u'type': u'statement', u'mainsnak': {u'datatype': u'time', u'property': u'P576', u'snaktype': u'novalue'}, u'id': u'Q483718$9da5583a-45e8-4268-2770-41d999bd53da', u'rank': u'normal'}
so there is no datavalue
here, see also in wikidata page https://www.wikidata.org/wiki/Q483718
so I think it make sense to return a None in this case?
The offending item appears to be https://www.wikidata.org/wiki/Q1041708. Maybe you were looking at the wrong tab? 😉
The problematic property for this item was P19 ("place of birth"), which is hard to see without inspecting the API response directly (page.cache['wikidata']['response']
). P19 is simply missing a "datavalue" member, normally found inside "mainsnak"!
"P19": [
{
"mainsnak": {
"snaktype": "somevalue",
"property": "P19",
"datatype": "wikibase-item"
},
"type": "statement",
"id": "q1041708$b4fe2176-475f-74f0-537a-9c9af65cc684",
"rank": "normal"
}
],
Thanks so much for the fix @seansay!