AttributeError: module 'lib' has no attribute 'Cryptography_HAS_TLSEXT_HOSTNAME'
See original GitHub issueI’ve used the python:3.7.6-slim-stretch
docker image for almost one year. Just today I got this strange issue (with pyOpenSSL==17.5.0
):
>>> from OpenSSL import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 673, in <module>
_lib.Cryptography_HAS_TLSEXT_HOSTNAME, "SNI not available"
AttributeError: module 'lib' has no attribute 'Cryptography_HAS_TLSEXT_HOSTNAME'
The only versions that work correctly are pyOpenSSL==19.1.0
and pyOpenSSL==20.0.0
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:7 (2 by maintainers)
Top Results From Across the Web
[SOLVED] AttributeError: module 'lib' has no attribute ...
Following an update on my CentOS 8, "certbot renew" cannot run and throws the following error: Code: Traceback (most recent call last): ...
Read more >AttributeError: module 'lib' has no attribute ... - CentOS forum
AttributeError : module 'lib' has no attribute 'Cryptography_HAS_TLSEXT_HOSTNAME' ... as a first line respond following any dnf command. I am ...
Read more >Bug #48506: AttributeError: module 'lib' has no attribute ...
Cryptography_HAS_TLSEXT_HOSTNAME, "SNI not available" AttributeError: module 'lib' has no attribute 'Cryptography_HAS_TLSEXT_HOSTNAME'.
Read more >AttributeError: module 'lib' has no attribute ... - Stack Overflow
@Daimto I am using the json file. After a few trials and error I did find that the error was due to conflicting...
Read more >What may be the cause of this error? AttributeError: module 'lib ...
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.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Upgrading pyopenssl will resolve this error. Cryptography removed the binding because pyopenssl 19.1 and above no longer depend on it.
We had this error pop up on one of servers today, and after comparing the dependent packages for pyopenssl on working servers vs the non-working server, I found that reverting
cryptography
from 3.3 to 3.2 (usingpip3 install cryptography==3.2
) works around this error until we figure out what’s going on.