AttributeError: module 'urllib' has no attribute 'proxy_bypass'

Bug #1878698 reported by Daniel Richard G.
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Jelmer Vernooij

Bug Description

This concerns brz 3.0.2-4ubuntu2 in Ubuntu focal.

I tried to checkout a bzr tree, and the danged thing blew up.

$ bzr branch
brz: ERROR: AttributeError: module 'urllib' has no attribute 'proxy_bypass'

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/bzr/", line 1765, in find_format_string
    return transport.get_bytes("format")
  File "/usr/lib/python3/dist-packages/breezy/transport/", line 631, in get_bytes
    f = self.get(relpath)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 160, in get
    code, response_file = self._get(relpath, None)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 191, in _get
    raise errors.NoSuchFile(abspath)
breezy.errors.NoSuchFile: No such file: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/", line 476, in _get_tree_branch
    tree = self.open_workingtree()
  File "/usr/lib/python3/dist-packages/breezy/bzr/", line 1118, in open_workingtree
    format = WorkingTreeFormatMetaDir.find_format(self)
  File "/usr/lib/python3/dist-packages/breezy/bzr/", line 1772, in find_format
    format_string = klass.find_format_string(controldir)
  File "/usr/lib/python3/dist-packages/breezy/bzr/", line 1767, in find_format_string
    raise errors.NoWorkingTree(base=transport.base)
breezy.errors.NoWorkingTree: No WorkingTree exists for "".

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/", line 1016, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/", line 1202, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python3/dist-packages/breezy/", line 759, in run_argv_aliases
  File "/usr/lib/python3/dist-packages/breezy/", line 784, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/", line 136, in run_simple
    return _do_with_cleanups(
  File "/usr/lib/python3/dist-packages/breezy/", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/", line 1465, in run
    accelerator_tree, br_from = controldir.ControlDir.open_tree_or_branch(
  File "/usr/lib/python3/dist-packages/breezy/", line 800, in open_tree_or_branch
    return controldir._get_tree_branch()
  File "/usr/lib/python3/dist-packages/breezy/", line 479, in _get_tree_branch
    branch = self.open_branch(name=name)
  File "/usr/lib/python3/dist-packages/breezy/bzr/", line 1103, in open_branch
    return, name=name,
  File "/usr/lib/python3/dist-packages/breezy/bzr/", line 1049, in open
    real_bzrdir =
  File "/usr/lib/python3/dist-packages/breezy/", line 706, in open
    return klass.open_from_transport(t, probers=probers,
  File "/usr/lib/python3/dist-packages/breezy/", line 736, in open_from_transport
    transport, format = _mod_transport.do_catching_redirections(
  File "/usr/lib/python3/dist-packages/breezy/transport/", line 1613, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python3/dist-packages/breezy/", line 724, in find_format
    return transport, ControlDirFormat.find_format(transport,
  File "/usr/lib/python3/dist-packages/breezy/", line 1162, in find_format
    return prober.probe_transport(transport)
  File "/usr/lib/python3/dist-packages/breezy/bzr/", line 86, in probe_transport
    server_version = medium.protocol_version()
  File "/usr/lib/python3/dist-packages/breezy/bzr/smart/", line 831, in protocol_version
  File "/usr/lib/python3/dist-packages/breezy/bzr/smart/", line 806, in query_version'hello')
  File "/usr/lib/python3/dist-packages/breezy/bzr/smart/", line 644, in call
  File "/usr/lib/python3/dist-packages/breezy/bzr/smart/", line 613, in finished_writing
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 727, in _finished_writing
    data = self._medium.send_http_smart_request(self._buffer)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 691, in send_http_smart_request
    code, body_filelike = t._post(bytes)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 424, in _post
    response = self._perform(
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 116, in _perform
    response =
  File "/usr/lib/python3.8/urllib/", line 522, in open
    req = meth(req)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 1116, in <lambda>
    lambda request: self.set_proxy(request, scheme))
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 1193, in set_proxy
    if self.proxy_bypass(host):
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 1151, in proxy_bypass
    return urllib.proxy_bypass(host)
AttributeError: module 'urllib' has no attribute 'proxy_bypass'

brz 3.0.2 on python 3.8.2 (Linux-5.4.0-29-generic-x86_64-with-glibc2.29)
arguments: ['/usr/bin/bzr', 'branch', '
plugins: bash_completion[3.0.2], changelog_merge[3.0.2],
    commitfromnews[3.0.2], cvs[3.0.2], darcs[3.0.2], email[3.0.2],
    fastimport[3.0.2], launchpad[3.0.2], mtn[3.0.2],
    netrc_credential_store[3.0.2], news_merge[3.0.2], po_merge[3.0.2],
    propose[3.0.2], repodebug[3.0.2], stats[3.0.2], upload[3.0.2],
encoding: 'utf-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
    including this traceback and a description of the problem.

Related branches

Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 3.1.0
Jelmer Vernooij (jelmer)
Changed in brz:
status: Fix Committed → Fix Released
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.