Hello,
I think this is not a bug, I guess I'm doing something wrong ...
I want to create a new Property on a own Wikidata instance. Here is the code:
1 wikibase_item = pywikibot.PropertyPage(wikibase_repo, datatype='wikibase-item')
2 wikibase_item.editLabels(labels={'en': 'My new property'}, summary='Setting labels')
3 print(wikibase_item)
I can create entities without problems, but this fails at line 2 with
WARNING: API error failed-save: The save has failed.
Traceback (most recent call last):
File "/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", line 113, in handle
func(self, *args, **kwargs)
File "/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", line 4259, in editEntity
baserevid=baserevid, **kwargs)
File "/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/tools/__init__.py", line 1738, in wrapper
return obj(*__args, **__kw)
File "/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/site.py", line 1322, in callee
return fn(self, *args, **kwargs)
File "/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/site.py", line 7911, in editEntity
data = req.submit()
File "/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/data/api.py", line 2079, in submit
raise APIError(**result['error'])
pywikibot.data.api.APIError: failed-save: The save has failed. [help:See http://localhost:8181/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Dennis/PycharmProjects/wikibaseEditor/main.py", line 26, in <module>
wikibase_item.editLabels(labels={'en': 'My new property'}, summary='Setting labels')
File "/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", line 4279, in editLabels
self.editEntity(data, **kwargs)
File "/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", line 134, in wrapper
handle(func, self, *args, **kwargs)
File "/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", line 126, in handle
raise pywikibot.OtherPageSaveError(self, err)
pywikibot.exceptions.OtherPageSaveError: Edit to page [[my:Property:-1]] failed:
failed-save: The save has failed. [help:See http://localhost:8181/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.]
CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.OtherPageSaveError'>Do you have any clue? I have given the bot full rights, so it should not be that.
Merci
D063520