This happens due to cryptography library version mismatch. Based on the convo below , pinning cryptography to 2.8 wth Prefect 0.15.5 solved the issue.
View in #prefect-community on Slack
@Kathryn_Klarich: Hi all, Iām not sure where the best place to post this is (here versus discourse), but I am running into an error when trying to register a prefect flow: AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
- it seems to be happening during this step RUN pip install pip --upgrade
- has anyone come across this before and know how to fix it? I was able to successfully register this flow a few days ago and havenāt changed much in the requirements since then.
@Kevin_Kho: I think uninstall prefect and re-install it and see if that helps?
What is your cryptography version?
@Kathryn_Klarich: hmm do i need to reinstall it in the image or in my conda environment that I am using to register the flow?
@Kevin_Kho: If this is a registration issue, I think just on the registration environment. I think something weird happened with the package versions there
@Kathryn_Klarich: in the image my flow is stored in it is 37.0.0, in my conda env it is 36.0.0
@Kevin_Kho: I think that mismatch might be an issue? I donāt know for sure. Itās a really weird error . For reference though, my stuff is working with 36.0.2 and Prefect 1.2
@Kathryn_Klarich: ok we are using 0.15.5
(prefect version)
iāll try upgrading cryptography on my local env to 0.37.0
@Kevin_Kho: Ah ok. It might not even be cryptography
Or well, you could re-build that conda environment if itās not too hard.
@Kathryn_Klarich: yeah i can rebuild the conda env
still getting the same error
maybe i should try rebuilding the base image?
and pinning cryptography to 36.0.2?
@Kevin_Kho: Maybe that might help. Itās not just cryptography tho one sec let me show you what i was reading
https://github.com/pyca/pyopenssl/issues/728 this is so old though
GitHub: AttributeError: module ālibā has no attribute āX509_up_refā Ā· Issue #728 Ā· pyca/pyopenssl
Oh lol cryptography
jumped from version 3.4.8 to 35.0.0. No wonder the versions felt so far
@Kathryn_Klarich: ohh haha weird. will check it out, thanks!
Ok I finally got it to work by pinning to cryptography==2.8
in the flowās image (that was the version of cryptography that other flows containerās were using). Iām not sure if this has something to do that we are using prefect version 0.15.5
@Kevin_Kho: Oh maybe. Glad you found a working version though
@Kathryn_Klarich: me too
thanks for your help!