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.

Author orivej
Recipients orivej
Date 2008-01-25.00:03:26
SpamBayes Score 0.36941105
Marked as misclassified No
Message-id <1201219408.32.0.189148181518.issue1929@psf.upfronthosting.co.za>
In-reply-to
Content
(With current python3-svn)
While trying to response.read() got this:

---
  File "/usr/lib/python3.0/httplib.py", line 533, in read
    return self._read_chunked(amt)
  File "/usr/lib/python3.0/httplib.py", line 573, in _read_chunked
    i = line.find(";")
TypeError: expected an object with the buffer interface
---

To debug I did this:
---
 line = self.fp.readline()
+print(' ***', line)
 i = line.find(b";")
---
and got "*** b'2e6d\r\n'" followed by those TypeError exception.
I did this:
---
    def _read_chunked(self, amt):
        assert self.chunked != _UNKNOWN
        chunk_left = self.chunk_left
-       value = ""
+       value = b""

            if chunk_left is None:
                line = self.fp.readline()
-               i = line.find(";")
+               i = line.find(b";")
---
And it seems to work.
History
Date User Action Args
2008-01-25 00:03:28orivejsetspambayes_score: 0.369411 -> 0.36941105
recipients: + orivej
2008-01-25 00:03:28orivejsetspambayes_score: 0.369411 -> 0.369411
messageid: <1201219408.32.0.189148181518.issue1929@psf.upfronthosting.co.za>
2008-01-25 00:03:27orivejlinkissue1929 messages
2008-01-25 00:03:26orivejcreate