from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions ImportError: DLL load failed while importing _rust: The specified procedure could not be found.
from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions ImportError: DLL load failed while importing _rust: The specified procedure could not be found.
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?
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.
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
@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.
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.
@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.
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.
This issue has not received a reporter response and has been auto-closed. If the issue is still relevant please leave a comment and we can reopen it.