Last modified: 2014-05-02 19:18:32 UTC
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.
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")
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.
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
Some additional error messages here, not obvious when they are triggered though ... https://raw.githubusercontent.com/brightbyte/Wikibase/master/repo/Wikibase.i18n.php Just recorded here in case we need them.
New PS uploaded in https://gerrit.wikimedia.org/r/#/c/129964/
Change 129964 merged by jenkins-bot: (bug 64494) do only retry on 'edit-already-exists' https://gerrit.wikimedia.org/r/129964