|Traceback (most recent call last)
EOFError: EOF when reading a line
Traceback (most recent call last):
File "C:\Users\31368\Desktop\post-1.py", line 24, in <module>
response=urllib.request.urlopen(request,data=form_data)
File "D:\Python APP\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "D:\Python APP\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "D:\Python APP\lib\urllib\request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "D:\Python APP\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "D:\Python APP\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "D:\Python APP\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
今天出现了这个错误,其实我是感觉到非常迷茫,我分别用三种软件打开了python脚本,一个是sublime,python idle还有
Windows的命令行,但是他们都报错三种不同类型的错误。data表单里无数据,真的不知道该怎么办?
然后又莫名其妙的被解决了,先记录一下这种类型错误。
今天还认识了状态码
|HTTP的状态吗| |
|--4xx:客户端错误
400 Bad Request
服务器未能理解请求。
401 Unauthorized
被请求的页面需要用户名和密码。
401.1
登录失败。
401.2
服务器配置导致登录失败。
401.3
由于 ACL 对资源的限制而未获得授权。
401.4
筛选器授权失败。
401.5
ISAPI/CGI 应用程序授权失败。
401.7
访问被 Web 服务器上的 URL 授权策略拒绝。这个错误代码为 IIS 6.0 所专用。
402 Payment Required
此代码尚无法使用。
403 Forbidden
对被请求页面的访问被禁止。
等我有了审美再来想着好好分享,现在没心情