-
-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No module named 'keyring.backends.OS_X' after upgrade to 22 #486
Comments
Similar troubles while executing I think that this error is caused by commit 4aed205. My traceback for
repeated several times. Thank you. |
@JD-Veiga I'm seeing similar errors now as well whenever I call |
I'm unable to replicate the reported issue:
Neither on macOS:
The error you report indicates that there is a mismatch between metadata and the version installed (you have keyring metadata from keyring<22 with an install of keyring==22). Furthermore, the error that's reported is logged to the screen but doesn't block the execution. My recommendation is that you ponder further what actions could have led to the metadata mismatch. Do you have legacy metadata lingering in the environment? How did it get there? |
@jaraco thanks for your reply.
How could I check for that?
I've no idea. I exclusively update packages via |
Solved! I have been upgrading keyring from one version to next one via pip. For whatever reason, several versions of keyring metadata --corresponding to successive keyring versions-- have been kept in site-packages folder. So the solution in my case was to uninstall all using Maybe it is caused by the way I use pip (combined with macports). At least in my case, this is no bug in keyring but in the way it was upgraded in my system. Thank you, @jaraco for your help. |
Good question. You could manually scan the directories in
I simulated a situation where two different versions were installed (22 over 21.8) using pip-run:
|
@JD-Veiga that somewhat gave some insight. It seems that I have the package @jaraco your suggested check after uninstalling version [PosixPath('/usr/lib/python3/dist-packages/keyring-18.0.1.egg-info')] with it reinstalled - again triggering the original error message [PosixPath('/home/sebastian/.local/lib/python3.8/site-packages/keyring-22.0.0.dist-info'), PosixPath('/usr/lib/python3/dist-packages/keyring-18.0.1.egg-info')] which confirms your suspicion. |
@gothicVI, that's good information. Now that I consider your use-case more, I think you may have uncovered a weakness in Using the pip-run technique to simulate the multiply-installed versions, I see the error emitted:
|
I filed python/importlib_metadata#280 to capture the underlying weakness. In the meantime, your best bet will be to either ignore the error (it is in fact ignorable, as annoying as it is), or remove keyring from the system site-packages (with sudo apt uninstall python-keyring maybe?), or upgrade the version in system site packages. I may consider making this module present in keyring 22 just to avoid these errors. Let me know how you fare with the recommendations above and how painful they are for your environment. |
I'll follow that issue - thanks a lot! |
I tested that commit with the repro and determined it works:
|
I can confirm that version |
When updating keyring from version 21.8.0 to 22.0.0, using pip version 21.0 on Linux, I get:
The text was updated successfully, but these errors were encountered: