Torrent list empty but upload and downloads in progress

General support for problems installing or using Deluge
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Torrent list empty but upload and downloads in progress

Post by Cas »

Okay I see the problem now that we have added code that requires Twisted >= 21.2.

I will work with the developer who added the code to see if we can provide compatible code but in the meantime the only suggestion would be to try

Code: Select all

sudo pip install twisted[tls]
Just to be aware 'sudo pip' installs system-wide so can potentially cause issues with already installed package such as Twisted.

Edit: We might have a fix ready today
jeps
Leecher
Leecher
Posts: 81
Joined: Wed May 18, 2011 4:32 pm

Re: Torrent list empty but upload and downloads in progress

Post by jeps »

I made an Ubuntu 21.10 server, which has Twisted version 20.3.0

But I still get the same error (I think it is the same ;) :
File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 119, in run_daemon
daemon.start()
File "/usr/lib/python3/dist-packages/deluge/core/daemon.py", line 161, in start
reactor.run()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1283, in run
self.mainLoop()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1292, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 913, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/usr/lib/python3/dist-packages/deluge/decorators.py", line 191, in activate
d = defer.Deferred.fromCoroutine(self.coro)
builtins.AttributeError: type object 'Deferred' has no attribute 'fromCoroutine'

I thought the problem was the version of Twisted, but it seems to involve more than Twisted.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Torrent list empty but upload and downloads in progress

Post by Cas »

It needs to be Twisted greater than version 21.2.0 so Twisted 20.3.0 is less than that
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Torrent list empty but upload and downloads in progress

Post by mhertz »

Sorry jeps for posting wrong info, my mistake.

Strange, when I tested on ubuntu 21.10 yesterday, then could reproduce with 'sudo pip install twisted==18.9.0', but not with 'twisted==19.2.0', and stopped testing afterwards. However now when thinking about it, then never gotten your posted error either, only the failed auth one previously posted, but could reproduce issue of not could add torrent however.

Anyway, just regarding some previous questions, then in my testings, then the apt installed stuff, took precedense over the pip system-wide installed, it's also using /usr/local for system-wide pip installs, atleast on some distros, don't remember if on ubuntu, sorry, think read once it deferred based on distro selected default.

It's easy to change twisted versions using pip, and you don't need install system-wide, I never do personally for myself, but just post like that because guess most want that, and is easier often for reasons not needing go into here.

So need to uninstall python3-twisted, think it's actually called python3-twisted-bin, from apt, and then can install and use the one from pip(just called 'twisted' there), which should be latest ver when not specifying ver(==) specifically.

Yeah the deluge-develop PPA currently features libtorrent 1.1.12, so if using old distro, then will "force" that, though ubuntu LTS features 1.1.13, so will override that PPA, though still not valid for dev-deluge, but can add the libtorrent 1.2 daily PPA Cas previously posted, or use the one from pip.

The easiest is probably to rely on pypi for everything i.e. if having git installed, then install latest deluge-dev, twisted and libtorrent by running 'sudo pip install git+https://github.com/deluge-torrent/deluge'(if not going through git and instead pip install https-url, zip or folder, then need manually add RELEASE-VERSION first, as bug about that e.g. in my posted zips I added that manually to overcome), 'sudo pip install libtorrent', wih firstly uninstalling all deluge components gotten from apt or PPA, and if not already removed with deluge, also libtorrent-rasterbar(probably have 9 and/or 10 after name) and python3-libtorrent and python3-twisted, run uninstall command for all those(through apt) just in case. Otherwise maybe can install twisted from pip, and then afterwards deluge and libtorrent from PPAs, though don't know if accepts that or installs own ver, hence my thought to just use pip for all, but your call of-course(I don't think you can uninstall twisted after installing deluge, from apt, unless adding dep-overridding switches to apt, I mean to install from pip afterwards).
Paint
New User
New User
Posts: 8
Joined: Mon Jul 08, 2019 3:47 pm

Re: Torrent list empty but upload and downloads in progress

Post by Paint »

like suggested a few posts ago, installing the latest twisted python library fixes the problem

Code: Select all

pip install twisted[tls]==21.2.0
thank you, guys!
jeps
Leecher
Leecher
Posts: 81
Joined: Wed May 18, 2011 4:32 pm

Re: Torrent list empty but upload and downloads in progress

Post by jeps »

Nice - short - precise :lol:
Really, that was the needed command

Thanks a lot.
israuor
New User
New User
Posts: 8
Joined: Wed Feb 09, 2022 5:50 am

Re: Torrent list empty but upload and downloads in progress

Post by israuor »

Still can't get my deluged daemon running anymore on my Ubuntu 18.04 server. Maybe anyone couldn't help? Where and how do I get the proper libtorrent from? (would prefer ppa or something easy)

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/deluged", line 11, in <module>
    load_entry_point('deluge==2.1.1.dev7687', 'gui_scripts', 'deluged')()
  File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 87, in start_daemon
    from deluge.core.daemon import is_daemon_running
  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 34, in <module>    f'Deluge {get_version()} requires libtorrent >= {REQUIRED_VERSION}'
deluge.error.LibtorrentImportError: Deluge 2.1.1.dev7687 requires libtorrent >= 1.2.0.0
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Torrent list empty but upload and downloads in progress

Post by mhertz »

From e.g this PPA, which I checked includes ubuntu 18.04, I didn't look for a libtorrent 2.0 PPA though.

Code: Select all

sudo add-apt-repository ppa:libtorrent.org/1.2-daily
sudo apt-get update
sudo apt-get upgrade
(If still issue, run 'sudo apt install python3-libtorrent' and if still, then also(though I would presume pulled in already by former command, but regardless): 'sudo apt install libtorrent-rasterbar10')

Or from pypi, and omit 'sudo' if wanting user-install instead of system:

Code: Select all

sudo pip install libtorrent==1.2.*
(If no 'pip' command, then 'sudo apt install python3-pip' first - also could be you need stipulate 'pip3' specifically, in above line of 'sudo pip install libtorrent==1.2.*' line as don't know if 'pip' defaults to 'pip2' or 'pip3' in your older distro version)

If wanting latest libtorrent from pypi(2.0.5), then don't need stipulate specific version, so ditch the '==1.2.*' part from above line, so 'sudo pip install libtorrent'(if already installed from pip, need '-U' added to pip for upgrading it to newer version, as not done by default - btw, asterisk used just to avoid changing command upon new update/install, so not specifically needed, and e.g adding '5' or '15' is same, sorry if you know already).
israuor
New User
New User
Posts: 8
Joined: Wed Feb 09, 2022 5:50 am

Re: Torrent list empty but upload and downloads in progress

Post by israuor »

okay.. did everything ans still can't run my beloved deluged yet.. see:

Code: Select all

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/bin/deluged", line 11, in <module>
    load_entry_point('deluge==2.1.1.dev7687', 'gui_scripts', 'deluged')()
  File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 87, in start_daemon
    from deluge.core.daemon import is_daemon_running
  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'
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Torrent list empty but upload and downloads in progress

Post by mhertz »

Could you check if libtorrent installed from the PPA propperly e.g. does it state package-name followed by [installed], and what version stated:

Code: Select all

apt list python3-libtorrent
And/or what is location of libtorrent when running:

Code: Select all

pip3 show libtorrent -v
Last, what output when running:

Code: Select all

python3 -c "import libtorrent; print(libtorrent.version)"
If you have old unsupported libtorrent installed i.e. under 1.2.x, then remove it with 'sudo apt remove python3-libtorrent', and then install again, so either 'sudo pip3 install libtorrent', or 'sudo add-apt-repository ppa:libtorrent.org/1.2-daily; sudo apt update; sudo apt install python3-libtorrent', just repeating just in case.
Post Reply