Open cfellicious opened 4 years ago
I confirm the issue.
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.
I created PR #131 to use the API action=delete.
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'}]}}