AttributeError: 'X509' object has no attribute '_x509'问题解决

From cffi callback : Traceback (most recent call last): File “/python2.7/local/lib/python2.7/site-packages/OpenSSL/SSL.py”, line 313, in wrapper _lib.X509_up_ref(x509) AttributeError: ‘module’ object has no attribute ‘X509_up_ref’ From cffi callback : Traceback (most recent call last): File “/python2.7/local/lib/python2.7/site-packages/OpenSSL/SSL.py”, line 313, in wrapper _lib.X509_up_ref(x509) AttributeError: ‘module’ object has no attribute ‘X509_up_ref’

报错情景下的包版本:

requests==2.18.4

requests-oauthlib==0.8.0

requests-pkcs12==1.0.3

requests-toolbelt==0.8.0

urllib3==1.22

cryptography==2.1.3

cffi==1.11.2

pycrypto==2.6.1

网上的其他答案,五花八门。

https://www.jianshu.com/p/2c8494ddd93a

Let’s encrypt免费SSL证书相关问题

测试发现,只有阿里云主机出现此情况,本地ubuntu虚拟机完全没问题。

最后升级cryptography==2.2.2 解决。

    原文作者:pygogogo
    原文地址: https://www.jianshu.com/p/41370752ab27
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞