Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'module' object has no attribute 'SSL_ST_INIT' #12

Open
tersmitten opened this issue Oct 12, 2017 · 2 comments
Open

AttributeError: 'module' object has no attribute 'SSL_ST_INIT' #12

tersmitten opened this issue Oct 12, 2017 · 2 comments

Comments

@tersmitten
Copy link
Contributor

I don't know if this is something you can fix on your side, but we get this error in Ubuntu 16.04.

Traceback (most recent call last):
  File "/usr/local/bin/twisted-connect-proxy", line 8, in <module>
    from twisted.web.proxy import Proxy, ProxyRequest
  File "/usr/lib/python2.7/dist-packages/twisted/web/proxy.py", line 24, in <module>
    from twisted.internet import reactor
  File "/usr/lib/python2.7/dist-packages/twisted/internet/reactor.py", line 38, in <module>
    from twisted.internet import default
  File "/usr/lib/python2.7/dist-packages/twisted/internet/default.py", line 56, in <module>
    install = _getInstallFunction(platform)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/default.py", line 44, in _getInstallFunction
    from twisted.internet.epollreactor import install
  File "/usr/lib/python2.7/dist-packages/twisted/internet/epollreactor.py", line 24, in <module>
    from twisted.internet import posixbase
  File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 18, in <module>
    from twisted.internet import error, udp, tcp
  File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 29, in <module>
    from twisted.internet._newtls import (
  File "/usr/lib/python2.7/dist-packages/twisted/internet/_newtls.py", line 21, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/tls.py", line 41, in <module>
    from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
  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'

Upgrading pyopenssl (pip install 'pyopenssl>=16.2.0') fixes the problem, but I rather not do that (system wide).

@tersmitten
Copy link
Contributor Author

Ubuntu 16.04

root@ansible-twisted-connect-proxy-ubuntu-1604:~# openssl version
OpenSSL 1.0.2g  1 Mar 2016

Installing collected packages: pyopenssl
  Found existing installation: pyOpenSSL 0.15.1
    Uninstalling pyOpenSSL-0.15.1:
      Successfully uninstalled pyOpenSSL-0.15.1
Successfully installed pyopenssl-17.3.0

Ubuntu 14.04

vagrant@ansible-twisted-connect-proxy-ubuntu-1404:~$ openssl version
OpenSSL 1.0.1f 6 Jan 2014

Installing collected packages: pyopenssl
Successfully installed pyopenssl-17.3.0

@tersmitten
Copy link
Contributor Author

The old python-openssl seems to be a dependency of python-twisted-core (in Ubuntu 16.04)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant