AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'

General support for problems installing or using Deluge
Post Reply
rmccurdyDOTcom
New User
New User
Posts: 1
Joined: Sun Apr 30, 2023 2:46 pm

AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'

Post by rmccurdyDOTcom »

So I set of account just to post this fix:
* I failed the challange to register twice
* went to my yahoo junk
* great work thank you all !!!!!
* fix for me was:

Code: Select all

apt-get remove --purge deluge*
pip uninstall pyopenssl deluged
pip install deluge
Error:

Code: Select all

deluged ;deluge-web
Traceback (most recent call last):
  File "/usr/local/bin/deluged", line 8, in <module>
    sys.exit(start_daemon())
  File "/usr/local/lib/python3.9/dist-packages/deluge/core/daemon_entry.py", line 87, in start_daemon
    from deluge.core.daemon import is_daemon_running
  File "/usr/local/lib/python3.9/dist-packages/deluge/core/daemon.py", line 14, in <module>
    from twisted.internet import reactor
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/reactor.py", line 38, in <module>
    from twisted.internet import default
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/default.py", line 55, in <module>
    install = _getInstallFunction(platform)
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/default.py", line 43, in _getInstallFunction
    from twisted.internet.epollreactor import install
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/epollreactor.py", line 19, in <module>
    from twisted.internet import posixbase
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/posixbase.py", line 19, in <module>
    from twisted.internet import error, tcp, udp
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/tcp.py", line 38, in <module>
    from twisted.internet._newtls import (
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/_newtls.py", line 18, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/usr/local/lib/python3.9/dist-packages/twisted/protocols/tls.py", line 40, in <module>
    from OpenSSL.SSL import (
  File "/usr/local/lib/python3.9/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/local/lib/python3.9/dist-packages/OpenSSL/crypto.py", line 3268, in <module>
    _lib.OpenSSL_add_all_algorithms()
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'
plex@plexlocal:~$ Traceback (most recent call last):
  File "/usr/local/bin/deluge-web", line 8, in <module>
    sys.exit(start())
  File "/usr/local/lib/python3.9/dist-packages/deluge/ui/web/__init__.py", line 6, in start
    web.start()
  File "/usr/local/lib/python3.9/dist-packages/deluge/ui/web/web.py", line 69, in start
    from deluge.ui.web import server
  File "/usr/local/lib/python3.9/dist-packages/deluge/ui/web/server.py", line 17, in <module>
    from twisted.internet import defer, reactor
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/reactor.py", line 38, in <module>
    from twisted.internet import default
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/default.py", line 55, in <module>
    install = _getInstallFunction(platform)
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/default.py", line 43, in _getInstallFunction
    from twisted.internet.epollreactor import install
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/epollreactor.py", line 19, in <module>
    from twisted.internet import posixbase
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/posixbase.py", line 19, in <module>
    from twisted.internet import error, tcp, udp
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/tcp.py", line 38, in <module>
    from twisted.internet._newtls import (
  File "/usr/local/lib/python3.9/dist-packages/twisted/internet/_newtls.py", line 18, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/usr/local/lib/python3.9/dist-packages/twisted/protocols/tls.py", line 40, in <module>
    from OpenSSL.SSL import (
  File "/usr/local/lib/python3.9/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/local/lib/python3.9/dist-packages/OpenSSL/crypto.py", line 3268, in <module>
    _lib.OpenSSL_add_all_algorithms()
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'

Post by mhertz »

Thank you, much appreciated! :)

For the record, if googling the error, it's seemingly related to upgraded cryptography 39.0.0 together with outdated pyopenssl, now fixed in pyopenssl 22.1.0(through pinning supported versions).

Thanks again, appreciate you registering for helping out, classy move indeed.
Post Reply