Skip to content
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

Bug: Error importing "sshkey_tools.keys" (Module 'openssl' has no attribute 'ed25519') #33

Closed
andresalvcar opened this issue Oct 3, 2023 · 6 comments

Comments

@andresalvcar
Copy link

Error importing:

from sshkey_tools.keys import (
RsaPrivateKey,
EcdsaPrivateKey,
Ed25519PrivateKey,
EcdsaCurves
)

AttributeError: module 'openssl' has no attribute 'ed25519'

Few days ago, it worked perfectly fine. Now I am not able to work with this library. I tried to uninstall, update and go back older versions, didn't work.

@scheibling
Copy link
Collaborator

Let me check this, the Cryptography library recently made some changes to their structure which caused some issues a while back.
Which Python version are you currently using?

@andresalvcar
Copy link
Author

andresalvcar commented Oct 3, 2023

Hello! My Python version is 3.9.6.

A teammate with Python 3.11 has the same issue.

@scheibling

This comment was marked as outdated.

@scheibling
Copy link
Collaborator

Hi, nevermind the last comment. I was able to reproduce this with the Cryptography version at <41, looks like I forgot to add that constraint to the requirements when I updated the code for the newer versions. You could try manually upgrading that library by running pip3 install --upgrade "cryptography>=41.0"

@andresalvcar
Copy link
Author

Hello @scheibling . I have followed the steps and now I don't have any problem with the library. Thank you very much!

@scheibling
Copy link
Collaborator

Fantastic, thank you for the feedback! I'll send out 0.10.2 (#34) in a little bit which has the minimum versions specified, you shouldn't need to run into this in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants