can't branch a repo with ERROR httplib.BadStatusLine: ''

Bug #1498304 reported by Kelvin Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

kelvin@XPS-13:~/Project/canonical$ bzr branch lp:ubuntu/software-center
bzr: ERROR: httplib.BadStatusLine: ''

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 1452, in run
    from_location)
  File "/usr/lib/python2.7/dist-packages/bzrlib/controldir.py", line 781, in open_tree_or_branch
    return controldir._get_tree_branch()
  File "/usr/lib/python2.7/dist-packages/bzrlib/remote.py", line 761, in _get_tree_branch
    return None, self.open_branch(name=name)
  File "/usr/lib/python2.7/dist-packages/bzrlib/remote.py", line 795, in open_branch
    ignore_fallbacks=ignore_fallbacks)
  File "/usr/lib/python2.7/dist-packages/bzrlib/remote.py", line 777, in _open_branch
    possible_transports=possible_transports)
  File "/usr/lib/python2.7/dist-packages/bzrlib/remote.py", line 3372, in __init__
    hook(self)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/__init__.py", line 131, in _check_is_up_to_date
    lp_api_lite.report_freshness(the_branch, verbosity, latest_pub)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/lp_api_lite.py", line 285, in report_freshness
    latest_ver, branch_ver = _get_newest_versions(the_branch, latest_pub)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/lp_api_lite.py", line 219, in _get_newest_versions
    latest_ver = latest_pub.get_latest_version()
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/lp_api_lite.py", line 147, in get_latest_version
    json_info = self._get_lp_info()
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/lp_api_lite.py", line 125, in _get_lp_info
    response = urllib2.urlopen(req)
  File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1240, in https_open
    context=self._context)
  File "/usr/lib/python2.7/urllib2.py", line 1200, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/lib/python2.7/httplib.py", line 1127, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''

bzr 2.7.0dev1 on python 2.7.9 (Linux-3.19.0-28-generic-x86_64-with-
    Ubuntu-15.04-vivid)
arguments: ['/usr/bin/bzr', 'branch', 'lp:ubuntu/software-center']
plugins: bash_completion[2.7.0dev1], builddeb[2.8.6],
    changelog_merge[2.7.0dev1], colo[0.4.0], grep[2.7.0dev1],
    launchpad[2.7.0dev1], netrc_credential_store[2.7.0dev1],
    news_merge[2.7.0dev1], pipeline[1.5.0], po_merge[2.7.0dev1],
    weave_fmt[2.7.0dev1]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'

Revision history for this message
Vincent Ladeuil (vila) wrote :

It was most probably a transient issue with launchpad ( I can't reproduce it).

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
tags: added: launchpad robustness
Revision history for this message
Vincent Ladeuil (vila) wrote :

There are several code paths where transient issues with launchpad should be addressed by re-trying the request at least once (ideally several times with an exponential backoff since we know lp down times are rare and limited in time).

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.