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

https://oldpan.me/archives/lets-encrypt-ssl-renew-problem

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

最后升级cryptography==2.2.2 解决。

你可能感兴趣的:(AttributeError: 'X509' object has no attribute '_x509'问题解决)