我在 python 中编码有一些问题,我想在本地 python 服务中使用 abyssws python 创建 Web 服务,但是我无法收到响应..而当我从浏览器请求时得到响应..
我的代码是这样的:
import httplib
IP = "local ip"
v_params = ""
conn = httplib.HTTPConnection(IP,8021)
conn.request("GET", v_params)
response = conn.getresponse()
data_response = response.read()
并得到类似的错误
Traceback(most recent call last):
File "C:\Python24\lib\httplib.py", line 866, in getresponse
response.begin()
File "C:\Python24\lib\httplib.py", line 336, in begin
version, status, reason = self._read_status()
File "C:\Python24\lib\httplib.py", line 300, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine
有什么建议吗?请帮帮我?