"BadStatusLine" during "easy_install sneakylang"

Create issue
Issue #18 resolved
Sridhar Ratnakumar created an issue

easy_install should not b throwing ugly errors like this (users do not care). instead it should 1) show nice error message on console 2) throw custom exceptions so people who use the setuptools/distribute API can handle it. {{{ #!python

Searching for sneakylang Reading http://pypi.python.org/simple/sneakylang/ Reading http://projects.almad.net/sneakylang Reading http://projects.almad.net/sneakylang/wiki/Download Traceback (most recent call last): File "e2/bin/easy_install", line 8, in <module> load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')() File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1671, in main File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1659, in with_ei_usage File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1675, in <lambda> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command cmd_obj.run() File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 211, in run File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 433, in easy_install File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 462, in fetch_distribution File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 303, in find_packages File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 617, in scan_url File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 201, in process_url File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 278, in process_index File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 617, in scan_url File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 189, in process_url File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 579, in open_url File "/private/tmp/i/e2/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 717, in open_with_auth File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 401, in _open '_open', req) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1103, in do_open r = h.getresponse() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 950, in getresponse response.begin() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 390, in begin version, status, reason = self._read_status() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine

}}}

Comments (4)

  1. Sridhar Ratnakumar reporter

    Apparently this does not happen /all/ the time .. and is not specific to this package ('sneakylang').

  2. Tarek Ziadé repo owner

    Mmm after more thaught, this can be fixed for 0.6.1.

    Bad status line may occur when the distant server hangs. We can raise a friendlier message when it happens and just quit for 0.6.1

    in 0.7 we can try to download the file from another source if there's one

  3. Log in to comment