PanicException: Python API call failed for Cryptography package

3.6k views Asked by At

I am running Python unit tests in Jenkins with moto for mocking SSM parameters. They worked just fine, until today I did upgrade Python version (3.9.8 -> 3.9.15) and got an error in Jenkins when collecting items for test session:

    from cryptography.hazmat.binding._rust import exceptions as rust_exceptions
    pyo3_runtime.PanicException: Python API call failed

The build works just fine locally, but crashes in Jenkins. I have rolled back to previous package versions, but it persists. I compared it with a last successful build and Moto, Cryptography, Boto versions are identical. At this point I am really running out of possible options, as it seems there are virtually no differences between the version that currently fails in Jenkins and that succeeded yesterday. Thanks for any help!

1

There are 1 answers

0
DanielM On

Install cffi:

pip install cffi --upgrade