我试着运行Couch土豆,但是在重新启动和更新之后,不知怎么地,我得到了这个错误。我不知道怎么解决这个问题。我已经尝试过重新安装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'发布于 2018-05-08 20:25:58
这似乎是在旧版本的pyopenssl版本中存在的错误,再加上其他相关包中的更改。有几个与它相关的bug报告(比如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 pyopensslhttps://askubuntu.com/questions/990365
复制相似问题