AttributeError: 'module' object has no attribute 'GSSException'

Bug #1765448 reported by Ken Roberts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
paramiko
Invalid
Low
Unassigned

Bug Description

When trying to pull trunk update on OpenLP. Last time I ran bzr was about 4 weeks ago.

OS: Fedora release 26 (Twenty Six)

Bazaar (bzr) 2.7.0
  Python interpreter: /usr/bin/python 2.7.14
  Python standard library: /usr/lib64/python2.7
  Platform: Linux-4.15.17-200.fc26.x86_64-x86_64-with-fedora-26-Twenty_Six

Name: gssapi
Version: 1.2.0

Name: paramiko
Version: 2.2.3

Console traceback:

-----------------
 ken> ~/openlp/trunk $ bzr pull
Using saved parent location: bzr+ssh://bazaar.launchpad.net/+branch/openlp/
bzr: ERROR: exceptions.AttributeError: 'module' object has no attribute 'GSSException'

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1224, in run
    possible_transports=possible_transports)
  File "/usr/lib64/python2.7/site-packages/bzrlib/branch.py", line 186, in open
    possible_transports=possible_transports, _unsupported=_unsupported)
  File "/usr/lib64/python2.7/site-packages/bzrlib/controldir.py", line 689, in open
    _unsupported=_unsupported)
  File "/usr/lib64/python2.7/site-packages/bzrlib/controldir.py", line 723, in open_from_transport
    return format.open(transport, _found=True)
  File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 1486, in open
    return self._open(transport)
  File "/usr/lib64/python2.7/site-packages/bzrlib/remote.py", line 317, in _open
    return RemoteBzrDir(transport, self)
  File "/usr/lib64/python2.7/site-packages/bzrlib/remote.py", line 436, in __init__
    self._probe_bzrdir()
  File "/usr/lib64/python2.7/site-packages/bzrlib/remote.py", line 448, in _probe_bzrdir
    self._rpc_open_2_1(path)
  File "/usr/lib64/python2.7/site-packages/bzrlib/remote.py", line 455, in _rpc_open_2_1
    response = self._call('BzrDir.open_2.1', path)
  File "/usr/lib64/python2.7/site-packages/bzrlib/remote.py", line 73, in _call
    return self._client.call(method, *args)
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/client.py", line 59, in call
    result, protocol = self.call_expecting_body(method, *args)
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/client.py", line 72, in call_expecting_body
    method, args, expect_response_body=True)
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/client.py", line 55, in _call_and_read_response
    return request.call_and_read_response()
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/client.py", line 155, in call_and_read_response
    return self._call_determining_protocol_version()
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/client.py", line 218, in _call_determining_protocol_version
    response_tuple, response_handler = self._call(protocol_version)
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/client.py", line 189, in _call
    response_handler = self._send(protocol_version)
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/client.py", line 267, in _send
    self._send_no_retry(encoder)
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/client.py", line 315, in _send_no_retry
    encoder.call(self.method, *self.args)
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/protocol.py", line 1308, in call
    self._write_end()
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/protocol.py", line 1131, in _write_end
    self.flush()
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/protocol.py", line 1097, in flush
    self._real_write_func(''.join(self._buf))
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/medium.py", line 545, in accept_bytes
    self._accept_bytes(bytes)
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/medium.py", line 1176, in _accept_bytes
    self._medium._accept_bytes(bytes)
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/medium.py", line 988, in _accept_bytes
    self._ensure_connection()
  File "/usr/lib64/python2.7/site-packages/bzrlib/smart/medium.py", line 1005, in _ensure_connection
    vendor = ssh._get_ssh_vendor()
  File "/usr/lib64/python2.7/site-packages/bzrlib/lazy_import.py", line 108, in __getattribute__
    obj = object.__getattribute__(self, '_resolve')()
  File "/usr/lib64/python2.7/site-packages/bzrlib/lazy_import.py", line 85, in _resolve
    obj = factory(self, scope, name)
  File "/usr/lib64/python2.7/site-packages/bzrlib/lazy_import.py", line 200, in _import
    module = __import__(module_python_path, scope, scope, [member], level=0)
  File "/usr/lib64/python2.7/site-packages/bzrlib/transport/ssh.py", line 40, in <module>
    import paramiko
  File "/usr/lib/python2.7/site-packages/paramiko/__init__.py", line 31, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 38, in <module>
    from paramiko.auth_handler import AuthHandler
  File "/usr/lib/python2.7/site-packages/paramiko/auth_handler.py", line 47, in <module>
    from paramiko.ssh_gss import GSSAuth, GSS_EXCEPTIONS
  File "/usr/lib/python2.7/site-packages/paramiko/ssh_gss.py", line 54, in <module>
    GSS_EXCEPTIONS = (gssapi.GSSException,)
AttributeError: 'module' object has no attribute 'GSSException'

bzr 2.7.0 on python 2.7.14 (Linux-4.15.17-200.fc26.x86_64-x86_64-with-
    fedora-26-Twenty_Six)
arguments: ['/usr/bin/bzr', 'pull']
plugins: bash_completion[2.7.0], changelog_merge[2.7.0], grep[2.7.0],
    launchpad[2.7.0], netrc_credential_store[2.7.0], news_merge[2.7.0],
    po_merge[2.7.0], weave_fmt[2.7.0]
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/bzr/+filebug
    including this traceback and a description of the problem.
-------------

Tags: bzr
Revision history for this message
Ken Roberts (alisonken1) wrote :

/usr/lib/python2.7/site-packages/paramiko/ssh_gss.py - adding AttributeError to except (line 55) allows bzr to continue:

try:
    import gssapi
    GSS_EXCEPTIONS = (gssapi.GSSException,)
except (ImportError, OSError, AttributeError):
    try:
        import pywintypes
        import sspicon
        import sspi
        _API = "SSPI"
        GSS_EXCEPTIONS = (pywintypes.error,)
    except ImportError:
        GSS_AUTH_AVAILABLE = False
        _API = None

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This is a paramiko rather than a Bazaar issue.

affects: bzr → paramiko
Revision history for this message
Ken Roberts (alisonken1) wrote :

Please close this bug - problem has been resolved. (I believe I reinstalled several python modules and the problem has been resolved).

Revision history for this message
bitprophet (jeff-bitprophet) wrote :

Yea this sounds like the "wrong" `gssapi` module was installed, there are two packages out there both of which install the same module name, and Paramiko only knows how to use one of them. (This is an open ticket on our Github tracker, I don't have it memorized offhand.)

Changed in paramiko:
importance: Undecided → Low
status: New → Invalid
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.