0

在 Python 2.7.2 中,酸洗 ahttplib.HTTPMessage 的次数超过 99%。但有时在极少数情况下,它会失败:

dumps(info)

TypeError: can't pickle StringO objects


dumps(info, 2)

PicklingError: Can't pickle <type 'cStringIO.StringO'>: attribute lookup cStringIO.StringO failed

我怎样才能找出httplib.HTTPMessage类的哪个成员(它info的一个实例)有问题?

info从调用open()urllib2.build_opener. 到目前为止所有失败的 URL 中都有空格。

4

0 回答 0