我尝试运行couchpotato,但不知何故在重新启动并更新后出现此错误。我不知道如何解决它。我已经尝试重新安装OpenSSL并更新python,但现在运气不好。
mediaserver@mediaserver:~$ python /opt/couchpotato/CouchPotato.py --daemon
Traceback (most recent call last):
File "/opt/couchpotato/CouchPotato.py", line 133, in <module>
l = Loader()
File "/opt/couchpotato/CouchPotato.py", line 35, in __init__
from couchpotato.runner import getOptions
File "/opt/couchpotato/couchpotato/runner.py", line 22, in <module>
import requests
File "/opt/couchpotato/libs/requests/__init__.py", line 53, in <module>
from .packages.urllib3.contrib import pyopenssl
File "/opt/couchpotato/libs/requests/packages/urllib3/contrib/pyopenssl.py", line 53, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Traceback (most recent call last):
File "/opt/couchpotato/CouchPotato.py", line 133, in <module>
l = Loader()
File "/opt/couchpotato/CouchPotato.py", line 35, in __init__
from couchpotato.runner import getOptions
File "/opt/couchpotato/couchpotato/runner.py", line 22, in <module>
import requests
File "/opt/couchpotato/libs/requests/__init__.py", line 53, in <module>
from .packages.urllib3.contrib import pyopenssl
File "/opt/couchpotato/libs/requests/packages/urllib3/contrib/pyopenssl.py", line 53, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
答案1
这似乎是旧pyopenssl
版本中存在的错误,与其他相关软件包的变化有关。有几个与此相关的错误报告(例如https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843631)。大多数人似乎使用较新版本的 pyopenssl 就可以让它工作。为了不破坏系统中内置的 python 包,请在不使用 sudo 的情况下安装新版本的 pyopenssl:
# if you need it for python3:
pip3 install pyopenssl
# or for python2:
pip install pyopenssl