Last modified: 2014-06-14 19:23:59 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 T67758, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65758 - Invalid value for WbQuantity: long integer expected but gets a floatnumber
Invalid value for WbQuantity: long integer expected but gets a floatnumber
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
Wikidata (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
: 65940 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-26 05:25 UTC by xqt
Modified: 2014-06-14 19:23 UTC (History)
2 users (show)

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


Attachments

Description xqt 2014-05-26 05:25:59 UTC
>>> import pwb
>>> import pywikibot as py
>>> s = py.getSite('de')
>>> p = py.Page(s, 'Uranus (Planet)')
>>> item = py.ItemPage.fromPage(p)
>>> item.exists()

Traceback (most recent call last):
  File "<pyshell#11>", line 1, in <module>
    item.exists()
  File "pywikibot\page.py", line 2451, in exists
    self.get()
  File "pywikibot\page.py", line 2640, in get
    c = Claim.fromJSON(self.repo, claim)
  File "pywikibot\page.py", line 2881, in fromJSON
    data['mainsnak']['datavalue']['value'])
  File "pywikibot\__init__.py", line 358, in fromWikibase
    amount = long(wb[u'amount'])
ValueError: invalid literal for long() with base 10: '+0.044405586'
>>>
Comment 1 Gerrit Notification Bot 2014-05-26 06:02:33 UTC
Change 135397 had a related patch set uploaded by Xqt:
(bug 65758) WbQuantity may represent various value types

https://gerrit.wikimedia.org/r/135397
Comment 2 xqt 2014-05-30 10:53:35 UTC
*** Bug 65940 has been marked as a duplicate of this bug. ***
Comment 3 Gerrit Notification Bot 2014-06-14 10:51:32 UTC
Change 135397 merged by jenkins-bot:
(bug 65758) WbQuantity may represent various value types

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

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


Navigation
Links