In Python 2.7.2 pickling a httplib.HTTPMessage
works literally more than 99% of the times. But sometimes on rare occasions, it fails:
dumps(info)
TypeError: can't pickle StringO objects
dumps(info, 2)
PicklingError: Can't pickle <type 'cStringIO.StringO'>: attribute lookup cStringIO.StringO failed
How can I find out what member of the httplib.HTTPMessage
class (which info
is an instance of) has the problem?
I got info
from calling open()
on an object returned from urllib2.build_opener
. All URLs which have failed so far have spaces in them.