Last modified: 2014-05-02 19:18:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T66494, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64494 - on conflict with other label/description raise exception instead of retrying
on conflict with other label/description raise exception instead of retrying
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
Wikidata (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: xqt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-27 04:34 UTC by akkakk_bugzilla
Modified: 2014-05-02 19:18 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description akkakk_bugzilla 2014-04-27 04:34:33 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.
Comment 1 akkakk_bugzilla 2014-04-27 13:19:31 UTC
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")
Comment 2 Mpaa 2014-04-27 14:25:17 UTC
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.
Comment 3 Gerrit Notification Bot 2014-04-27 14:58:02 UTC
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
Comment 4 Mpaa 2014-04-27 18:57:58 UTC
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.
Comment 5 xqt 2014-05-02 06:08:45 UTC
New PS uploaded in https://gerrit.wikimedia.org/r/#/c/129964/
Comment 6 Gerrit Notification Bot 2014-05-02 07:50:28 UTC
Change 129964 merged by jenkins-bot:
(bug 64494) do only retry on 'edit-already-exists'

https://gerrit.wikimedia.org/r/129964

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links