Reputation: 45
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!
Upvotes: 3
Views: 7271
Reputation: 1079
This GitHub discussion suggested downgrading to cryptography==3.4.8
, which worked for me. I'm running Python 3.8.18 for my project on an M-series Mac.
pip install cryptography==3.4.8
Upvotes: 1