Page 1 of 1

No module named 'deluge.libtorrent', 2.1.1 on Ubuntu 20.04

Posted: Thu Sep 22, 2022 4:50 pm
by mortoray
I upgraded to version 2.1.1 today and am getting a `No module named 'deluge.libtorrent'` error.

I've tried uninstalling, reinstalling, including the libtorrent package, but nothing seems to help.

Code: Select all

18:48:18 [ERROR   ][deluge.ui.gtk3.gtkui              :1343] No libtorrent library found: No module named 'libtorrent'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 21, in <module>
    import deluge.libtorrent as lt
ModuleNotFoundError: No module named 'deluge.libtorrent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 24, in <module>
    import libtorrent as lt
ModuleNotFoundError: No module named 'libtorrent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/gtkui.py", line 309, in _on_reactor_start
    client.start_standalone()
  File "/usr/lib/python3/dist-packages/deluge/ui/client.py", line 637, in start_standalone
    self._daemon_proxy = DaemonStandaloneProxy(self.__event_handlers)
  File "/usr/lib/python3/dist-packages/deluge/ui/client.py", line 458, in __init__
    from deluge.core import daemon
  File "/usr/lib/python3/dist-packages/deluge/core/daemon.py", line 19, in <module>
    from deluge.core.core import Core
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 26, in <module>
    from deluge._libtorrent import LT_VERSION, lt
  File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 26, in <module>
    raise LibtorrentImportError('No libtorrent library found: %s' % (ex))
deluge.error.LibtorrentImportError: No libtorrent library found: No module named 'libtorrent'

Re: No module named 'deluge.libtorrent', 2.1.1 on Ubuntu 20.04

Posted: Sun Oct 16, 2022 10:30 am
by yozart
got exact same issue in truenas jail 12.3.

see https://www.truenas.com/community/threa ... ost-713112
for all my install details

From what I saw, the issue is with the binding of the libtorrent library with python
I wasn't able to find anythng on this topic

Re: No module named 'deluge.libtorrent', 2.1.1 on Ubuntu 20.04

Posted: Wed Oct 19, 2022 8:25 pm
by yozart
Apparently, this is a bug in libtorrent binding:
https://github.com/arvidn/libtorrent/issues/6890

Not sure what to do to fix! This is broken since march and didn't found any solution yet

Re: No module named 'deluge.libtorrent', 2.1.1 on Ubuntu 20.04

Posted: Wed Nov 02, 2022 7:12 am
by fibulatactful
Is this issue still unresolved?
five nights at freddy's

Re: No module named 'deluge.libtorrent', 2.1.1 on Ubuntu 20.04

Posted: Wed Nov 02, 2022 12:47 pm
by mhertz
The issue from OP regarding ubuntu 20.04 I just now tested in a VM and verified to atleast not be a general issue imho.

Install deluge from PPA or pypa on ubuntu 20.04, as main repo package is deluge 2.0.3, and make sure don't mix'n match e.g. libtorrent from main repo and deluge from PPA/pypa won't work, since deluge 2.1.1 doesn't support libtorrent 1.1.x like the main repo package provides and indeed would show such error I believe - check if that's the case(having libtorrent under 1.2.x) through e.g:

Code: Select all

python3 -c "import libtorrent; print(libtorrent.version)"
The truenas issue of yozart I cannot comment on sorry.

Fixed: No module named 'deluge.libtorrent', 2.1.1 on Ubuntu 20.04

Posted: Thu Nov 24, 2022 11:06 pm
by yozart
Fix available in the truenas tpic. I proposed a patch in the github of truenas plugin based on the answer