Last modified: 2014-11-01 12:32:42 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 T74603, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72603 - 'Maximum retries' api.py exception is not Python 3 compatible
'Maximum retries' api.py exception is not Python 3 compatible
Status: NEW
Product: Pywikibot
Classification: Unclassified
network (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks: pwbpy3
  Show dependency treegraph
 
Reported: 2014-10-28 04:23 UTC by John Mark Vandenberg
Modified: 2014-11-01 12:32 UTC (History)
0 users

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


Attachments

Description John Mark Vandenberg 2014-10-28 04:23:13 UTC
In this py3 build, there are some network issues, and py3 exception handling shows three exceptions, including json decoding exceptions.  The result is confusing to someone unfamiliar with py3 or not intimately aware of how the api.py request error handling is organised.

https://travis-ci.org/wikimedia/pywikibot-core/jobs/39178815

======================================================================
ERROR: testLinkMethods (tests.site_tests.TestSiteObject)
Test site methods for getting links to and from a page.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/python/3.3.5/lib/python3.3/json/decoder.py", line 367, in raw_decode
    obj, end = self.scan_once(s, idx)
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py", line 606, in submit
    result = json.loads(rawdata)
  File "/opt/python/3.3.5/lib/python3.3/json/__init__.py", line 316, in loads
    return _default_decoder.decode(s)
  File "/opt/python/3.3.5/lib/python3.3/json/decoder.py", line 351, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/python/3.3.5/lib/python3.3/json/decoder.py", line 369, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/build/wikimedia/pywikibot-core/tests/site_tests.py", line 331, in testLinkMethods
    filterRedirects=False))
  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/site.py", line 2582, in pagebacklinks
    content=content
  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/site.py", line 2568, in pagebacklinks
    for redir in redirgen:
  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py", line 1095, in __iter__
    self.data = self.request.submit()
  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py", line 828, in submit
    self._data = super(CachedRequest, self).submit()
  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py", line 624, in submit
    self.wait()
  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py", line 711, in wait
    raise TimeoutError("Maximum retries attempted without success.")
pywikibot.data.api.TimeoutError: Maximum retries attempted without success.
Comment 1 John Mark Vandenberg 2014-11-01 12:32:42 UTC
Another occurance https://travis-ci.org/wikimedia/pywikibot-core/jobs/39676780

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


Navigation
Links