https://bugzilla.wikimedia.org/show_bug.cgi?id=64494
Bug ID: 64494 Summary: on conflict with other label/description raise exception instead of retrying Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Unprioritized Component: Wikidata Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: akkakk_bugzilla@yahoo.de Web browser: --- Mobile Platform: ---
when adding a label or description a conflict with another label with the same label and description may occur. the framework currently retries to edit a lot of times before failing with an TimeoutError. it should instead raise a suitable exception.
https://bugzilla.wikimedia.org/show_bug.cgi?id=64494
--- Comment #1 from akkakk_bugzilla@yahoo.de --- code to reproduce:
#!/usr/bin/python # -*- coding: utf-8 -*- import pywikibot site = pywikibot.Site("wikidata", "wikidata") repo = site.data_repository() q = "Q5281234" item_obj = pywikibot.ItemPage(repo, q) content = item_obj.get() descriptions = content['descriptions'] descriptions['en'] = "Wikimedia disambiguation page" item_obj.editDescriptions(summary=u"testing for https://bugzilla.wikimedia.org/show_bug.cgi?id=64494", descriptions=descriptions) print("please check that https://www.wikidata.org/wiki/Q5281234 hasn't change")
https://bugzilla.wikimedia.org/show_bug.cgi?id=64494
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |mpaa.wiki@gmail.com Ever confirmed|0 |1
--- Comment #2 from Mpaa mpaa.wiki@gmail.com --- The retry has been inserted to fix this bug: https://bugzilla.wikimedia.org/show_bug.cgi?id=62126.
Here one gets:
result -> {u'servedby': u'mw1199', u'error': {u'info': u'Another item (Q1151870) already has label "disambiguation" and description "Wikimedia disambiguation page" associated with language code en.', u'code': u'failed-save', u'messages': {u'0': {u'type': u'error', u'name': u'wikibase-error-label-not-unique-item', u'parameters' [u'disambiguation', u'en', {}, u'Wikimedia disambiguation page']}, u'html': {u'*': u'<p>Another item (Q1151870) already has label "disambiguation" and description "Wikimedia disambiguation page" associated with language code en.\n</p>'}}}}
Probably the reason of failure should be analysed to understand the action to take.
https://bugzilla.wikimedia.org/show_bug.cgi?id=64494
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 129964 had a related patch set uploaded by Xqt: (bug 64494) do not retry on wikibase-error-label-not-unique-item
https://gerrit.wikimedia.org/r/129964
https://bugzilla.wikimedia.org/show_bug.cgi?id=64494
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=64494
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |info@gno.de Assignee|Pywikipedia-bugs@lists.wiki |info@gno.de |media.org |
pywikipedia-bugs@lists.wikimedia.org