jaraco / keyring

MIT License
1.24k stars 152 forks source link

keyring.backends.fail.Keyring object at 0x7f468533b790 #647

Closed ooker777 closed 9 months ago

ooker777 commented 1 year ago

In the attempt to solve a problem from another library, I open WSL on Windows 11 and run it again:

root@OokerLaptop:~# keep tui
Traceback (most recent call last):
  File "/usr/local/bin/keep", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/keep_cli/__main__.py", line 162, in main
    token = keyring.get_password("google-keep-token", config["username"])
  File "/usr/local/lib/python3.10/dist-packages/keyring/core.py", line 56, in get_password
    return get_keyring().get_password(service_name, username)
  File "/usr/local/lib/python3.10/dist-packages/keyring/backends/fail.py", line 28, in get_password
    raise NoKeyringError(msg)
keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.

WSL's keyring --list-backends:

keyring.backends.chainer.ChainerBackend (priority: -1)
keyring.backends.fail.Keyring (priority: 0)

WSL's get_keyring():

python
Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from keyring import get_keyring
>>> get_keyring()
<keyring.backends.fail.Keyring object at 0x7f468533b790>
>>>

PowerShell's keyring --list-backends

keyring.backends.fail.Keyring (priority: 0)
keyring.backends.chainer.ChainerBackend (priority: -1)
keyring.backends.Windows.WinVaultKeyring (priority: 5)

PowerShell's get_keyring():

python
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr  4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from keyring import get_keyring
>>> get_keyring()
<keyring.backends.Windows.WinVaultKeyring object at 0x00000211B7E21E10>
>>>
jaraco commented 9 months ago

Duplicate of #630