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'm using keyring in python project compiled with cx_freeze on Windows 10...
Got this error:
File "C:/msys64/mingw64/lib/python3.8/site-packages/keyring/core.py", line 192, in <module>
init_backend()
File "C:/msys64/mingw64/lib/python3.8/site-packages/keyring/core.py", line 96, in init_backend
filter(limit, backend.get_all_keyring()),
File "C:/msys64/mingw64/lib/python3.8/site-packages/keyring/util/__init__.py", line 22, in wrapper
func.always_returns = func(*args, **kwargs)
File "C:/msys64/mingw64/lib/python3.8/site-packages/keyring/backend.py", line 216, in get_all_keyring
_load_plugins()
File "C:/msys64/mingw64/lib/python3.8/site-packages/keyring/backend.py", line 199, in _load_plugins
entry_points = metadata.entry_points()['keyring.backends']
KeyError: 'keyring.backends'
In my python-env :
keyring 21.2.0
keyrings.alt 3.4.0
In my code, i'm doing this:
...
import keyring
from keyring.backends import Windows
...
class MyProgram():
def __init__(self):
if platform.system() == "Windows":
keyring.set_keyring(Windows.WinVaultKeyring())
self.main()
To have a working executable, i've to switch to keyring 18.0.1
Thanks for help!
The text was updated successfully, but these errors were encountered:
mrichez-saluc
changed the title
KeyError: 'keyring.backends' Windows 10 - Keyring 21.2.0
KeyError: 'keyring.backends' Windows 10 - Keyring 21.2.0 with cx_freeze
Mar 17, 2020
The problem here is that cx_Freeze is not supplying the necessary metadata, so keyring.backends doesn't exist.
I agree keyring should perhaps behave nicer when the metadata isn't available, especially if you're setting they keyring explicitly as I see you are. Probably this issue was introduced in a9fe227, released with 19.3.0.
Someone attempted to solve this issue (or something similar in #422). I'll see if I can put together a fix that includes a test and a less aggressive patch.
I'm using keyring in python project compiled with cx_freeze on Windows 10...
Got this error:
In my python-env :
keyring 21.2.0
keyrings.alt 3.4.0
In my code, i'm doing this:
Here's a part of setup-freeze.py:
To have a working executable, i've to switch to keyring 18.0.1
Thanks for help!
The text was updated successfully, but these errors were encountered: