AttributeError: 'module' object has no attribute 'X509_up_ref'

in Linux with 0 comment

在Python项目中出现报错

From cffi callback <function _verify_callback at 0x7f53ec1d2ed8>:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/OpenSSL/SSL.py", line 309, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'

解决办法

卸载再重装pyOpenSSL

pip uninstall pyOpenSSL
pip install pyOpenSSL
Responses