2

I try to run couchpotato, but somehow I get this error after I rebooted and updated. I have no clue how to solve it. I already tried reinstalling OpenSSL and updating python, but now luck.

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'
  • Still no solution found.. :( – Fietswiel Jan 7 '18 at 10:49
1

This seems to be an error existent in older pyopenssl versions, in combination with changes in other related packages. There are a couple of bug reports relating to it (like https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843631). Most people seem get it to work using a more recent version of pyopenssl. In order to not break your systems built in python packages, install new version of pyopenssl without sudo:

# if you need it for python3:
pip3 install pyopenssl

# or for python2:
pip install pyopenssl
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.