This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: invalid literal for int() with base 16: ''
Type: crash Stage:
Components: Installation Versions: Python 2.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, eric.smith, xhomol11
Priority: normal Keywords:

Created on 2008-08-29 07:35 by xhomol11, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg72121 - (view) Author: ivo (xhomol11) Date: 2008-08-29 07:35
I tested metode urllib2.read() on 2000 web_pages and there was a
exception ValueError in only one case, here is short code:

import urllib2
req = urllib2.urlopen('http://www.peachbit.org/')
req.read()


Traceback (most recent call last):
  File "httplib_bug.py", line 6, in <module>
    req.read()
  File "/usr/lib/python2.5/socket.py", line 291, in read
    data = self._sock.recv(recv_size)
  File "/usr/lib/python2.5/httplib.py", line 509, in read
    return self._read_chunked(amt)
  File "/usr/lib/python2.5/httplib.py", line 548, in _read_chunked
    chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: ''
msg72122 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-08-29 09:12
This is already fixed in trunk. (see issue900744)
Can you try with a 2.6 version?
msg72598 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2008-09-05 14:55
The test fails for me on 2.5.1 (stock Mac OS 10.5.4) in the same way as
described in this bug.

In 2.6 (r66230) the test succeeds.

I recommend we close this.
History
Date User Action Args
2022-04-11 14:56:38adminsetgithub: 47971
2008-09-05 15:20:28amaury.forgeotdarcsetstatus: pending -> closed
2008-09-05 14:55:49eric.smithsetnosy: + eric.smith
messages: + msg72598
2008-08-29 09:12:19amaury.forgeotdarcsetstatus: open -> pending
resolution: out of date
messages: + msg72122
nosy: + amaury.forgeotdarc
2008-08-29 07:35:25xhomol11create