python 的 EOFError: EOF when reading a line 是什么原因?

2013-05-07 20:04:22 +08:00
 ithelloworld
在程序执行过程中,出现过如题的错误信息。

google了一些,好像是python或部署的原因,但是有这些错误信息:

Traceback (most recent call last):

...

File "/usr/local/lib/python2.7/urllib.py", line 84, in urlopen
return opener.open(url)

File "/usr/local/lib/python2.7/urllib.py", line 205, in open
return getattr(self, name)(url)

File "/usr/local/lib/python2.7/urllib.py", line 356, in open_http
return self.http_error(url, fp, errcode, errmsg, headers)

File "/usr/local/lib/python2.7/urllib.py", line 369, in http_error
result = method(url, fp, errcode, errmsg, headers)

File "/usr/local/lib/python2.7/urllib.py", line 663, in http_error_301
return self.http_error_302(url, fp, errcode, errmsg, headers, data)

File "/usr/local/lib/python2.7/urllib.py", line 632, in http_error_302
data)

File "/usr/local/lib/python2.7/urllib.py", line 659, in redirect_internal
return self.open(newurl)

File "/usr/local/lib/python2.7/urllib.py", line 205, in open
return getattr(self, name)(url)

File "/usr/local/lib/python2.7/urllib.py", line 356, in open_http
return self.http_error(url, fp, errcode, errmsg, headers)

File "/usr/local/lib/python2.7/urllib.py", line 369, in http_error
result = method(url, fp, errcode, errmsg, headers)

File "/usr/local/lib/python2.7/urllib.py", line 694, in http_error_401
return getattr(self,name)(url, realm)

File "/usr/local/lib/python2.7/urllib.py", line 758, in retry_http_basic_auth
user, passwd = self.get_user_passwd(host, realm, i)

File "/usr/local/lib/python2.7/urllib.py", line 787, in get_user_passwd
user, passwd = self.prompt_user_passwd(host, realm)

File "/usr/local/lib/python2.7/urllib.py", line 796, in prompt_user_passwd
host))

EOFError: EOF when reading a line

这是权限问题?

到底是什么问题呢?
9648 次点击
所在节点    程序员
2 条回复
darasion
2013-05-08 11:41:39 +08:00
ithelloworld
2013-05-08 11:50:52 +08:00
@darasion 谢谢。但我认为这是认证问题。
关于basic认证,可以这样访问URL:
https://gooduser:secretpassword@www.example.com/webcallback?foo=bar
我设置了这样的URL,却仍然是那些信息。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/68070

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX