You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Linux environment (Ubuntu Xenial) created with python3-dbus (implicitly) installed but also python3.6 installed from the deadsnakes repo. In this environment, the dbus package is available (in /usr/local/lib/python3/dist-packages) but the underlying _dbus_bindings is not available (because the bindings were compiled for Python 3.5). In that environment, if one attempts to import dbus, one gets:
>>> import dbus
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/dbus/__init__.py", line 82, in <module>
import dbus.types as types
File "/usr/lib/python3/dist-packages/dbus/types.py", line 6, in <module>
from _dbus_bindings import (
ModuleNotFoundError: No module named '_dbus_bindings'
If one attempts to import dbus again, a different error occurs:
>>> import dbus
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/dbus/__init__.py", line 81, in <module>
import dbus.exceptions as exceptions
AttributeError: module 'dbus' has no attribute 'exceptions'
And because keyring has two modules each of which attempt to import dbus but trapping only ImportErrors, the import will fail.
>>> import keyring
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/keyring/__init__.py", line 3, in <module>
from .core import (set_keyring, get_keyring, set_password, get_password,
File "/usr/local/lib/python3.6/dist-packages/keyring/core.py", line 153, in <module>
init_backend()
File "/usr/local/lib/python3.6/dist-packages/keyring/core.py", line 66, in init_backend
keyrings = filter(limit, backend.get_all_keyring())
File "/usr/local/lib/python3.6/dist-packages/keyring/util/__init__.py", line 21, in wrapper
func.always_returns = func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/keyring/backend.py", line 184, in get_all_keyring
_load_backends()
File "/usr/local/lib/python3.6/dist-packages/keyring/backend.py", line 142, in _load_backends
list(map(_load_backend, backends))
File "/usr/local/lib/python3.6/dist-packages/keyring/backend.py", line 133, in _load_backend
mod = importlib.import_module('.' + name, package)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.6/dist-packages/keyring/backends/kwallet.py", line 12, in <module>
import dbus
File "/usr/lib/python3/dist-packages/dbus/__init__.py", line 81, in <module>
import dbus.exceptions as exceptions
AttributeError: module 'dbus' has no attribute 'exceptions'
In my opinion, this is an upstream issue in either Ubuntu or dbus, but keyring should probably work around the bug.
The text was updated successfully, but these errors were encountered:
I have a Linux environment (Ubuntu Xenial) created with
python3-dbus
(implicitly) installed but alsopython3.6
installed from the deadsnakes repo. In this environment, thedbus
package is available (in /usr/local/lib/python3/dist-packages) but the underlying_dbus_bindings
is not available (because the bindings were compiled for Python 3.5). In that environment, if one attempts to import dbus, one gets:If one attempts to import dbus again, a different error occurs:
And because keyring has two modules each of which attempt to import dbus but trapping only ImportErrors, the import will fail.
In my opinion, this is an upstream issue in either Ubuntu or dbus, but keyring should probably work around the bug.
The text was updated successfully, but these errors were encountered: