linux-cli-community
linux-cli-community copied to clipboard
[BUG] ModuleNotFoundError: No module named 'keyring.backends.macOS'
Describe the bug Since upgrade to Python 3.9.1+ i get the message ModuleNotFoundError for 'keyring.backends.macOS. But the CLI still connects and works as usual.
To Reproduce Steps to reproduce the behavior:
- run protonvpn-cli --version or protonvpn-cli c -f
- See error
Expected behavior It should run without message.
Error Messages/Program Output/Log Messages (~/.pvpn-cli/pvpn-cli.log)
Error initializing plugin EntryPoint(name='macOS', value='keyring.backends.macOS', group='keyring.backends').
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/keyring/backend.py", line 202, in _load_plugins
init_func = ep.load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
Desktop (please complete the following information):
- OS: Debian Testing Bullseye
- Python Version: 3.9.1+
- ProtonVPN-CLI Version: v3.2.1 (protonvpn-nm-lib v0.3.0; proton-client v0.2.0)
I saw similar error today when doing a pip uninstall of PyGObject
$ python --version Python 3.9.0+
$ pip --version pip 20.1.1 from /usr/lib/python3/dist-packages/pip (python 3.9)
$ lsb_release -a Description: Ubuntu 20.10 Codename: groovy
$ echo "n" | pip uninstall PyGObject
Error initializing plugin EntryPoint(name='macOS', value='keyring.backends.macOS', group='keyring.backends').
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/keyring/backend.py", line 203, in _load_plugins
init_func = ep.load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
I think this got rid of the problem for me
Permanently configure the Null keyring for the user
to see possible keyring locations
python -c "import keyring.util.platform_; print(keyring.util.platform_.config_root())"
python -c "import keyring.util.platform_; print(keyring.util.platform_.data_root())"
examine config first
cat ~/.config/python_keyring/keyringrc.cfg
cat ~/.local/share/python_keyring/keyringrc.cfg
keyring --disable
# or
python -m keyring --disable
# now should have null
cat ~/.config/python_keyring/keyringrc.cfg
cat ~/.local/share/python_keyring/keyringrc.cfg
# example
# [backend]
# default-keyring=keyring.backends.null.Keyring
# This approach affects all uses of keyring for that user.
I think this got rid of the problem for me
Permanently configure the Null keyring for the user
to see possible keyring locations
python -c "import keyring.util.platform_; print(keyring.util.platform_.config_root())" python -c "import keyring.util.platform_; print(keyring.util.platform_.data_root())"
examine config first
cat ~/.config/python_keyring/keyringrc.cfg cat ~/.local/share/python_keyring/keyringrc.cfg
keyring --disable # or python -m keyring --disable # now should have null cat ~/.config/python_keyring/keyringrc.cfg cat ~/.local/share/python_keyring/keyringrc.cfg # example # [backend] # default-keyring=keyring.backends.null.Keyring # This approach affects all uses of keyring for that user.
Hi,
I got stuck when examine the config. It reports No such file or directory
. But I copied and pasted it from the terminal.
Could you please help me with this? Many thanks!!
just pip uninstall and pip install the ones that bug in the logs