You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error when calling wdi_core.WDItemEngine.delete_items #116
When calling the "wdi_core.WDItemEngine.delete_items" function on our custom Wikibase(v1.32) the code crashes with the error message:
"for x in requests.get(url=url, params=params, headers=headers).json()['query']['pages'].values()][
KeyError: 'pages'"
I ran this piece of code requests.get(url=url, params=params, headers=headers).json() and got this as the result
{'batchcomplete': '', 'query': {'normalized': [{'from': 'Wikidata:Requests_for_deletions', 'to': 'wikidata:Requests for deletions'}], 'interwiki': [{'title': 'wikidata:Requests for deletions', 'iw': 'wikidata'}]}}
This might require a redesign. This function is aimed at wikidata, where the functionality is a bit different than in wikibase. In the latter users can delete directly, whereas in Wikidata (at least from a user perspective) deletions are issued through requests for deletions.
Activity
LeMyst commentedon May 20, 2020
I confirm the issue.
andrawaag commentedon May 20, 2020
This might require a redesign. This function is aimed at wikidata, where the functionality is a bit different than in wikibase. In the latter users can delete directly, whereas in Wikidata (at least from a user perspective) deletions are issued through requests for deletions.
I will investigate.
LeMyst commentedon May 20, 2020
I created PR #131 to use the API action=delete.