这是一个创建于 4014 天前的主题,其中的信息可能已经有所发展或是发生改变。
BadStatusLine: ''
raise BadStatusLine(line)
File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 407, in begin
response.begin()
File "/usr/lib/python2.7/httplib.py", line 1030, in getresponse
response = conn.getresponse()
File "taskblog.py", line 62, in get_remote_data
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/threading.py", line 504, in run
self.run()
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
Traceback (most recent call last):
Exception in thread Thread-1:
我用到队列和多线程,用httplib类,try conn.getresponse() 取得数据,无论用try都会使该线程出错.有没有方法处理?
1 条回复 • 1970-01-01 08:00:00 +08:00
|
|
1
likexian 2013-11-18 09:48:39 +08:00 1
BadStatusLine 目测对方网站返回了非200
话说你代码什么都没有,光有这个说个j8
|