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

from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions ImportError: DLL load failed while importing _rust: The specified procedure could not be found. #10899

Open
dinesh1299 opened this issue Apr 26, 2024 · 6 comments
Labels
waiting-on-reporter Issue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.

Comments

@dinesh1299
Copy link

from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions
ImportError: DLL load failed while importing _rust: The specified procedure could not be found.

@alex
Copy link
Member

alex commented Apr 26, 2024

If you would like help, you need to provide literally any information. How can we reproduce this? What steps did you take to install cryptography? How have you attempted to debug this?

@alex alex added the waiting-on-reporter Issue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply. label Apr 26, 2024
Copy link

This issue has been waiting for a reporter response for 3 days. It will be auto-closed if no activity occurs in the next 5 days.

@github-actions github-actions bot added the Stale label Apr 30, 2024
@werebear73
Copy link

I see this

Traceback (most recent call last):
  File "/app/lambda_function.py", line 13, in <module>
    import paramiko
  File "/app/lib/paramiko/__init__.py", line 22, in <module>
    from paramiko.transport import (
  File "/app/lib/paramiko/transport.py", line 33, in <module>
    from cryptography.hazmat.primitives.ciphers import algorithms, Cipher, modes
  File "/app/lib/cryptography/hazmat/primitives/ciphers/__init__.py", line 11, in <module>
    from cryptography.hazmat.primitives.ciphers.base import (
  File "/app/lib/cryptography/hazmat/primitives/ciphers/base.py", line 10, in <module>
    from cryptography.exceptions import (
  File "/app/lib/cryptography/exceptions.py", line 9, in <module>
    from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions
ImportError: cannot import name 'exceptions' from 'cryptography.hazmat.bindings._rust' (unknown location)

Python3 3.12
Cryptography -> 42.0.5
Paramiko -> 3.4.0
Cffi -> 1.16.0

@reaperhulk
Copy link
Member

@werebear73 The error you're showing (along with the path that says lamdba_function.py) suggests you're attempting to run this in AWS Lambda but you've likely packaged your function with the wrong cryptography. This project uses Python extensions (native libraries) and thus requires platform and architecture specific deployments. https://cryptography.io/en/latest/faq/#i-m-getting-errors-installing-or-importing-cryptography-on-aws-lambda has links to the AWS documentation for doing this correctly.

@github-actions github-actions bot removed the Stale label May 3, 2024
Copy link

github-actions bot commented May 6, 2024

This issue has been waiting for a reporter response for 3 days. It will be auto-closed if no activity occurs in the next 5 days.

@github-actions github-actions bot added the Stale label May 6, 2024
@werebear73
Copy link

@werebear73 The error you're showing (along with the path that says lamdba_function.py) suggests you're attempting to run this in AWS Lambda but you've likely packaged your function with the wrong cryptography. This project uses Python extensions (native libraries) and thus requires platform and architecture specific deployments. https://cryptography.io/en/latest/faq/#i-m-getting-errors-installing-or-importing-cryptography-on-aws-lambda has links to the AWS documentation for doing this correctly.

I tried these technics. I must be getting something wrong in translation because it is still not working.

@github-actions github-actions bot removed the Stale label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-reporter Issue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.
Development

No branches or pull requests

4 participants