Page MenuHomePhabricator

Error with Wikidata quantity properties with no bounds
Closed, ResolvedPublic

Description

Trying to get ItemPage of a Wikidata item with a quantity property defined with no bounds it raises KeyError: upperBound at pywikibot/__init__.py line 512.

Solved locally changing

#upperBound = eval(wb['upperBound'])
#lowerBound = eval(wb['lowerBound'])
upperBound = eval(wb.setdefault('upperBound', 'amount'))
lowerBound = eval(wb.setdefault('lowerBound', 'amount'))

Event Timeline

Solved updating Pywikibot to master 3.0-dev. It was Pywikibot 2.0rc5.