| Horcrux92 added a comment. |
In T151018#2808534, @Magul wrote:Hi @ChongDae, first of all thank You for your bug report, that's pretty well described issue. In future if You will find another, don't hesitate - just raport it here and attach to #Pywikibot-core project (as @Aklapper did).
And the second issue here is that I'm closing this one as a duplicate of T150210 and adding You to subscribers of the other one. There's already patch in code review that resolve this isssue waiting for successful review.
I have installed the latest version of Pywikibot and sometimes I get the same error. It happens only with some pages. For instance running:
1 #test.py
2 import pywikibot
3 site = pywikibot.Site("it", "wikipedia")
4 page = pywikibot.Page(site, "Albert Einstein")
5 item = pywikibot.ItemPage.fromPage(page)
6 page = pywikibot.Page(site, "Jefferson Airplane")
7 item = pywikibot.ItemPage.fromPage(page)
8 page = pywikibot.Page(site, "Marocco")
9 item = pywikibot.ItemPage.fromPage(page)I get the following:
Traceback (most recent call last): File "test.py", line 9, in <module> item = pywikibot.ItemPage.fromPage(page) File "C:\Users\Lorenzo\pywikibot\pywikibot\page.py", line 3556, in fromPage if not lazy_load and not i.exists(): File "C:\Users\Lorenzo\pywikibot\pywikibot\page.py", line 3158, in exists self.get() File "C:\Users\Lorenzo\pywikibot\pywikibot\page.py", line 3576, in get c = Claim.fromJSON(self.repo, claim) File "C:\Users\Lorenzo\pywikibot\pywikibot\page.py", line 3995, in fromJSON claim.type, lambda value, site: value)(value, site) File "C:\Users\Lorenzo\pywikibot\pywikibot\page.py", line 3942, in <lambda> 'quantity': lambda value, site: pywikibot.WbQuantity.fromWikibase(value), File "C:\Users\Lorenzo\pywikibot\pywikibot\__init__.py", line 512, in fromWikibase upperBound = eval(wb['upperBound']) KeyError: u'upperBound' <type 'exceptions.KeyError'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort(note the error is only at line 9)
What should I do?PWB version:
Pywikibot: pywikibot/__init__.py (c4ccfae, -1 (unknown), 2017/03/02, 02:02:52, n/a) Release version: 2.0rc5 httplib2 version: 0.9.1 cacerts: C:\Users\Lorenzo\pywikibot\externals\httplib2\python2\httplib2\cacerts.txt certificate test: ok Python: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] unicode test: ok
TASK DETAIL
EMAIL PREFERENCES
To: Magul, Horcrux92
Cc: Horcrux92, pywikibot-bugs-list, ChongDae, Aklapper, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Sn1per, jayvdb, Dalba, Masti, Alchimista, Rxy
Cc: Horcrux92, pywikibot-bugs-list, ChongDae, Aklapper, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Sn1per, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
