DD063520 created this task.
DD063520 added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  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 
&lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; 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

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, Viztor, DannyS712, 
Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, 
mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to