0

I have code the goes to a page and downloads information on its update. Every once in a while it errors out with

url2z = url2z.read()
  File "/usr/lib/python3.1/http/client.py", line 502, in read
    s = self._safe_read(self.length)
  File "/usr/lib/python3.1/http/client.py", line 594, in _safe_read
    raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(15928 bytes read, 37182 more expected)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.1/threading.py", line 516, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.1/threading.py", line 722, in run
    self.function(*self.args, **self.kwargs)
  File "rush.py", line 29, in Update
    url2z = url2z.read()
  File "/usr/lib/python3.1/http/client.py", line 502, in read
    s = self._safe_read(self.length)
  File "/usr/lib/python3.1/http/client.py", line 594, in _safe_read
    raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(0 bytes read, 53110 more expected)

Are there fixes for this or catches? I tried a try, except but the error still commences

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by pyTony
0

except IncompleteRead or maybe leave out the length from read if possible. Normaly you would not like to read incomplete page.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.