Page MenuHomePhabricator

addQualifier stopped working: APIError
Closed, ResolvedPublic

Description

Author: felix

Description:
"qualifier" is a newly created Claim. "claim" is an existing Claim of an item, which is received with item.claims.

claim.addQualifier(qualifier)

Traceback (most recent call last):

File "<stdin>", line 1, in <module>
File "core/pywikibot/page.py", line 3017, in addQualifier
  data = self.repo.editQualifier(self, qualifier, **kwargs)
File "core/pywikibot/site.py", line 721, in callee
  return fn(self, *args, **kwargs)
File "core/pywikibot/site.py", line 3882, in editQualifier
  data = req.submit()
File "core/pywikibot/data/api.py", line 401, in submit
  raise APIError(code, info, **result["error"])

pywikibot.data.api.APIError: no-such-qualifier: Claim does not have a qualifier with the given hash

The used code worked once.


Version: core-(2.0)
Severity: normal

Details

Reference
bz62916

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:51 AM
bzimport set Reference to bz62916.
bzimport added a subscriber: Unknown Object (????).

Change 119949 had a related patch set uploaded by FelixReimann:
(bug 62916) Only add hash if it is not None.

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

Change 119949 merged by jenkins-bot:
(bug 62916) Only add hash if it is not None.

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