albertvillanova / WikidataBot

Wikidata bot
http://www.wikidata.org/wiki/User:AVMbot
0 stars 0 forks source link

[scripts] add_ca_label_description crashes #24

Closed albertvillanova closed 4 years ago

albertvillanova commented 4 years ago
WARNING: API error modification-failed: Item [[Q83272097|Q83272097]] already has label "Virey" associated with language code ca, using the same description text.
Traceback (most recent call last):
  File "c:\users\avi14827\projects\wikidata\pywikibot\pywikibot\page.py", line 112, in handle
    func(self, *args, **kwargs)
  File "c:\users\avi14827\projects\wikidata\pywikibot\pywikibot\page.py", line 4253, in editEntity
    baserevid=baserevid, **kwargs)
  File "c:\users\avi14827\projects\wikidata\pywikibot\pywikibot\tools\__init__.py", line 1744, in wrapper
    return obj(*__args, **__kw)
  File "c:\users\avi14827\projects\wikidata\pywikibot\pywikibot\site.py", line 1346, in callee
    return fn(self, *args, **kwargs)
  File "c:\users\avi14827\projects\wikidata\pywikibot\pywikibot\site.py", line 8050, in editEntity
    data = req.submit()
  File "c:\users\avi14827\projects\wikidata\pywikibot\pywikibot\data\api.py", line 2080, in submit
    raise APIError(**result['error'])
pywikibot.data.api.APIError: modification-failed: Item [[Q83272097|Q83272097]] already has label "Virey" associated with language code ca, using the same description text. [messages:[{'name': 'wikibase-validator-label-with-description-conflict', 'parameters': ['Virey', 'ca', '[[Q83272097|Q83272097]]'], 'html': {'*': 'Item <a href="/wiki/Q83272097" title="Q83272097">Q83272097</a> already has label "Virey" associated with language code ca, using the same description text.'}}]; help:See https://www.wikidata.org/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.]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./scripts/add_ca_label_description.py", line 189, in <module>
    data['labels'] = ca_label
  File "./scripts/add_ca_label_description.py", line 106, in update_replaced_municipalities
    # Label
  File "./scripts/add_ca_label_description.py", line 159, in update_replaced_municipality
    config_logger(log_filename=args.log)
  File "c:\users\avi14827\projects\wikidata\pywikibot\pywikibot\page.py", line 133, in wrapper
    handle(func, self, *args, **kwargs)
  File "c:\users\avi14827\projects\wikidata\pywikibot\pywikibot\page.py", line 125, in handle
    raise pywikibot.OtherPageSaveError(self, err)
pywikibot.exceptions.OtherPageSaveError: Edit to page [[Q764858]] failed:
modification-failed: Item [[Q83272097|Q83272097]] already has label "Virey" associated with language code ca, using the same description text. [messages:[{'name': 'wikibase-validator-label-with-description-conflict', 'parameters': ['Virey', 'ca', '[[Q83272097|Q83272097]]'], 'html': {'*': 'Item <a href="/wiki/Q83272097" title="Q83272097">Q83272097</a> already has label "Virey" associated with language code ca, using the same description text.'}}]; help:See https://www.wikidata.org/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'>