[Resolved]AttributeError: module ‘cryptography.utils’ has no attribute ‘register_interface’ | Azure | ADF

In this article, we will explain how to resolve the Attribute error in Microsoft Azure and Data bricks note book activity.

We have observed that one of my job is failing in notebook activity due to the below error.


AttributeError: module ‘cryptography.utils’ has no attribute ‘register_interface’


The above error is very simple resolve by using the below steps I have followed while in production deployment.

Step 1: First, we have checked the Cryptography Package Library version. It showing 38. It seems like it has been updated.

Step 2: And followed the commands to added the libraries in theĀ  existing notebook.

Step 3: To import the below libraries one by one :

pip install PGPy
pip install cryptography==37.0.4
pip uninstall -y cryptography

After added the above package libraries in the notebook, the issue has been resolved.
Here first library pip install PGPy, this packages has been installed after pip command.
Second library uninstall the cryptography library from notebook.

Finally, install the older cryptography library 37.0.4 version. It’s working fine for me.

Summary: This article, we have resolved the cryptography.utils package in the Python notebook while writing the data bricks code. I’ve posted the entire error. And then step by step resolution to provided. Simply here we provided three python package libraries in the notebook. Just remove the cryptography package and then again install the cryptography packages. This is quiet common issue in the Python script.