Under certain conditions (I'm trying to open a
Shoutcast stream), I wind up with the following
exception from httplib:
Traceback (most recent call last):
File "/home/devel/lib/python2.4/threading.py", line
442, in __bootstrap
self.run()
File "avalanche.py", line 86, in run
streamData = streamResponse.read(256)
File "/home/devel/lib/python2.4/httplib.py", line
478, in read
self.length -= len(s)
TypeError: unsupported operand type(s) for -=: 'str'
and 'int'
Normally, self.length has many shields of the form "if
self.length is None:"; however, self.length gets
initialize to _UNKNOWN which is the string "UNKNOWN"
rather than None. As such, all of the shields are useless.
Am I using a deprecated library or something? I'm
really surprised no one else has bumped into this.
|