[SOLVED] AttributeError: module 'libtorrent' has no attribute 'add_torrent_params_flags_t'

General support for problems installing or using Deluge
Post Reply
psycholyzern
New User
New User
Posts: 6
Joined: Wed Nov 28, 2018 8:14 am

[SOLVED] AttributeError: module 'libtorrent' has no attribute 'add_torrent_params_flags_t'

Post by psycholyzern »

Hi. I installed deluged and deluged-web using stable PPA. But somehow deluged won't run. I got the logs below.

Code: Select all

deluged 2.0.3-2-201906121747-ubuntu18.04.1
libtorrent: 1.2.5.0
Python: 3.6.9
OS: Linux 4.15.0-88-generic

Code: Select all

File "/usr/bin/deluged", line 11, in <module>
    load_entry_point('deluge===2.0.3-2-201906121747-ubuntu18.04.1', 'console_scripts', 'deluged')()
  File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 90, in start_daemon
    from deluge.core.daemon import is_daemon_running
  File "/usr/lib/python3/dist-packages/deluge/core/daemon.py", line 22, in <module>
    from deluge.core.core import Core
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 43, in <module>
    from deluge.core.torrentmanager import TorrentManager
  File "/usr/lib/python3/dist-packages/deluge/core/torrentmanager.py", line 51, in <module>
    | lt.add_torrent_params_flags_t.flag_apply_ip_filter
AttributeError: module 'libtorrent' has no attribute 'add_torrent_params_flags_t'
Thanks
Last edited by psycholyzern on Tue Mar 24, 2020 4:44 am, edited 1 time in total.
psycholyzern
New User
New User
Posts: 6
Joined: Wed Nov 28, 2018 8:14 am

Re: AttributeError: module 'libtorrent' has no attribute 'add_torrent_params_flags_t'

Post by psycholyzern »

Something I found that might help.
https://github.com/arvidn/libtorrent/issues/3790
psycholyzern
New User
New User
Posts: 6
Joined: Wed Nov 28, 2018 8:14 am

Re: AttributeError: module 'libtorrent' has no attribute 'add_torrent_params_flags_t'

Post by psycholyzern »

turned out the problem lies in qBittorrent. I have libtorrent-rasterbar10 installed from qBittorrent's repo which is broken and apparently Deluge is using that. Solved this by removing qBittorrent repo and reinstall deluge which will install libtorrent-rasterbar from default repo instead.
iconoclasthero
Member
Member
Posts: 46
Joined: Tue Aug 28, 2018 12:39 am

Re: [SOLVED] AttributeError: module 'libtorrent' has no attribute 'add_torrent_params_flags_t'

Post by iconoclasthero »

I have exactly the same symptoms and I recently installed qbittorrent from it's stable PPA and it installed libtorrent-rasterbar??

Code: Select all

$ apt show libtorrent-rasterbar2* -a
Package: libtorrent-rasterbar2.0
Version: 2.0.8.git20230219.356219bda3-1ppa1~22.04
Priority: optional
Section: libs
Source: libtorrent-rasterbar
Maintainer: Christian Marillat <marillat@debian.org>
Installed-Size: 4,327 kB
Depends: libc6 (>= 2.34), libgcc-s1 (>= 3.4), libssl3 (>= 3.0.0~~alpha1), libstdc++6 (>= 12)
Replaces: libtorrent-rasterbar20
Download-Size: 1,472 kB
APT-Manual-Installed: no
APT-Sources: https://ppa.launchpadcontent.net/qbittorrent-team/qbittorrent-stable/ubuntu jammy/main amd64 Packages
Description: C++ bittorrent library by Rasterbar Software
 Bittorrent library by Rasterbar Software (Arvid Norberg).
 libtorrent-rasterbar is a C++ library that aims to be a good alternative to
 all the other bittorrent implementations around.
 .
 The main goals of libtorrent-rasterbar are:
 * to be cpu efficient
 * to be memory efficient
 * to be very easy to use
 .
 This package contains libtorrent-rasterbar run time shared library.

Package: libtorrent-rasterbar2.0
Version: 2.0.5-5
Priority: optional
Section: universe/libs
Source: libtorrent-rasterbar
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Christian Marillat <marillat@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 4,471 kB
Depends: libc6 (>= 2.34), libgcc-s1 (>= 3.4), libssl3 (>= 3.0.0~~alpha1), libstdc++6 (>= 11)
Homepage: https://libtorrent.org/
Download-Size: 1,501 kB
APT-Sources: http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
Description: C++ bittorrent library by Rasterbar Software
 Bittorrent library by Rasterbar Software (Arvid Norberg).
 libtorrent-rasterbar is a C++ library that aims to be a good alternative to
 all the other bittorrent implementations around.
 .
 The main goals of libtorrent-rasterbar are:
  * to be cpu efficient
  * to be memory efficient
  * to be very easy to use
 .
 This package contains libtorrent-rasterbar run time shared library.

Package: libtorrent-rasterbar20
Version: 2.0.7.git20220822.7bb4b410d7-1ppa1~22.04
Priority: optional
Section: libs
Source: libtorrent-rasterbar
Maintainer: Cristian Greco <cristian@debian.org>
Installed-Size: 4,266 kB
Pre-Depends: dpkg (>= 1.15.6~)
Depends: libc6 (>= 2.34), libgcc-s1 (>= 3.4), libssl3 (>= 3.0.0~~alpha1), libstdc++6 (>= 12)
Suggests: libtorrent-rasterbar-dbg
Download-Size: 1,454 kB
APT-Sources: https://ppa.launchpadcontent.net/qbittorrent-team/qbittorrent-stable/ubuntu jammy/main amd64 Packages
Description: C++ bittorrent library by Rasterbar Software
 Bittorrent library by Rasterbar Software (Arvid Norberg).
 libtorrent-rasterbar is a C++ library that aims to be a good alternative to
 all the other bittorrent implementations around.
 .
 The main goals of libtorrent-rasterbar are:
 * to be cpu efficient
 * to be memory efficient
 * to be very easy to use
 .
 This package contains libtorrent-rasterbar run time shared library.
I removed the qbittorrent ppa and then downgraded libtorrent-rasterbar2.0 to 2.0.5-5 which also unfortunately uninstalled deluge, deluged, qbittorrent:

Code: Select all

$ apt install libtorrent-rasterbar2.0=2.0.5-5
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libboost-python1.74.0
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  deluge deluged python3-libtorrent qbittorrent
The following packages will be DOWNGRADED:
  libtorrent-rasterbar2.0
0 upgraded, 0 newly installed, 1 downgraded, 4 to remove and 1 not upgraded.
so I had to reinstall deluge, deluged, and qbittorrent (from the repo)
iconoclasthero
Member
Member
Posts: 46
Joined: Tue Aug 28, 2018 12:39 am

Re: [SOLVED] AttributeError: module 'libtorrent' has no attribute 'add_torrent_params_flags_t'

Post by iconoclasthero »

NB: I installed qbittorrent while deluged was running [and had no issues until it crashed]. When I tried to add more than one torrent at a time, deluged crashed (as usual, bug submitted), and it could not be restarted. I would

Code: Select all

 systemctl restart deluged 
and it would say

Code: Select all

Active: active (running) since ... 
but a subsequent

Code: Select all

$ systemctl status deluged; sudo ps -A|grep deluged
would report back that it wasn't running (forget the actual language, probably "Active: active (exited)") and nothing was returned from the grep of ps. Additionally, even with

Code: Select all

-l /var/log/deluged/daemon.log -L debug
in /etc/init.d/deluged, the log file was useless. Instead of reporting the error, it kept overwriting the log and all it said was

Code: Select all

{timestamp} [INFO    ][deluge.configmanager:49  ] Setting config directory to: /var/lib/deluged/config
where {timestamp} was the last time I restarted deluged.

It was not until I executed deluged from the command line via:

Code: Select all

$ sudo deluged -d -c /var/lib/deluged/config -l /var/log/deluged/daemon.log -L debug
that I was able to see the error that the OP posted, i.e.,

Code: Select all

AttributeError: module 'libtorrent' has no attribute 'add_torrent_params_flags_t'
FWIW:

Code: Select all

$ deluged --version
deluged 2.1.1
libtorrent: 2.0.5.0
Python: 3.10.6
OS: Linux Ubuntu 22.04 jammy
Post Reply