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

Bug #1878698 reported by Daniel Richard G. on 2020-05-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Breezy
High
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 https://code.launchpad.net/~ubuntu-core-dev/pam/ubuntu
brz: ERROR: AttributeError: module 'urllib' has no attribute 'proxy_bypass'

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

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 476, in _get_tree_branch
    tree = self.open_workingtree()
  File "/usr/lib/python3/dist-packages/breezy/bzr/bzrdir.py", line 1118, in open_workingtree
    format = WorkingTreeFormatMetaDir.find_format(self)
  File "/usr/lib/python3/dist-packages/breezy/bzr/workingtree.py", line 1772, in find_format
    format_string = klass.find_format_string(controldir)
  File "/usr/lib/python3/dist-packages/breezy/bzr/workingtree.py", line 1767, in find_format_string
    raise errors.NoWorkingTree(base=transport.base)
breezy.errors.NoWorkingTree: No WorkingTree exists for "https://code.launchpad.net/~ubuntu-core-dev/pam/ubuntu/.bzr/checkout/".

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 1016, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 1202, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 759, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 784, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/cleanup.py", line 136, in run_simple
    return _do_with_cleanups(
  File "/usr/lib/python3/dist-packages/breezy/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/builtins.py", line 1465, in run
    accelerator_tree, br_from = controldir.ControlDir.open_tree_or_branch(
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 800, in open_tree_or_branch
    return controldir._get_tree_branch()
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 479, in _get_tree_branch
    branch = self.open_branch(name=name)
  File "/usr/lib/python3/dist-packages/breezy/bzr/bzrdir.py", line 1103, in open_branch
    return format.open(self, name=name,
  File "/usr/lib/python3/dist-packages/breezy/bzr/branch.py", line 1049, in open
    real_bzrdir = controldir.ControlDir.open(
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 706, in open
    return klass.open_from_transport(t, probers=probers,
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 736, in open_from_transport
    transport, format = _mod_transport.do_catching_redirections(
  File "/usr/lib/python3/dist-packages/breezy/transport/__init__.py", line 1613, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 724, in find_format
    return transport, ControlDirFormat.find_format(transport,
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 1162, in find_format
    return prober.probe_transport(transport)
  File "/usr/lib/python3/dist-packages/breezy/bzr/__init__.py", line 86, in probe_transport
    server_version = medium.protocol_version()
  File "/usr/lib/python3/dist-packages/breezy/bzr/smart/medium.py", line 831, in protocol_version
    client_protocol.query_version()
  File "/usr/lib/python3/dist-packages/breezy/bzr/smart/protocol.py", line 806, in query_version
    self.call(b'hello')
  File "/usr/lib/python3/dist-packages/breezy/bzr/smart/protocol.py", line 644, in call
    self._request.finished_writing()
  File "/usr/lib/python3/dist-packages/breezy/bzr/smart/medium.py", line 613, in finished_writing
    self._finished_writing()
  File "/usr/lib/python3/dist-packages/breezy/transport/http/__init__.py", line 727, in _finished_writing
    data = self._medium.send_http_smart_request(self._buffer)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/__init__.py", line 691, in send_http_smart_request
    code, body_filelike = t._post(bytes)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/__init__.py", line 424, in _post
    response = self._perform(
  File "/usr/lib/python3/dist-packages/breezy/transport/http/__init__.py", line 116, in _perform
    response = self._opener.open(request)
  File "/usr/lib/python3.8/urllib/request.py", line 522, in open
    req = meth(req)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/_urllib2_wrappers.py", line 1116, in <lambda>
    lambda request: self.set_proxy(request, scheme))
  File "/usr/lib/python3/dist-packages/breezy/transport/http/_urllib2_wrappers.py", line 1193, in set_proxy
    if self.proxy_bypass(host):
  File "/usr/lib/python3/dist-packages/breezy/transport/http/_urllib2_wrappers.py", 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', 'https://code.launchpad.net/~ubuntu-
    core-dev/pam/ubuntu']
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],
    weave_fmt[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
        https://bugs.launchpad.net/brz/+filebug
    including this traceback and a description of the problem.

Related branches

Jelmer Vernooij (jelmer) on 2020-05-14
Changed in brz:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 3.1.0
Jelmer Vernooij (jelmer) on 2020-06-08
Changed in brz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers