V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ithelloworld
V2EX  ›  程序员

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

  •  
  •   ithelloworld · 2013-05-07 20:04:22 +08:00 · 9679 次点击
    这是一个创建于 4249 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在程序执行过程中,出现过如题的错误信息。

    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

    这是权限问题?

    到底是什么问题呢?
    2 条回复    1970-01-01 08:00:00 +08:00
    ithelloworld
        2
    ithelloworld  
    OP
       2013-05-08 11:50:52 +08:00
    @darasion 谢谢。但我认为这是认证问题。
    关于basic认证,可以这样访问URL:
    https://gooduser:[email protected]/webcallback?foo=bar
    我设置了这样的URL,却仍然是那些信息。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5886 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 02:26 · PVG 10:26 · LAX 18:26 · JFK 21:26
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.