Torrent list empty but upload and downloads in progress

General support for problems installing or using Deluge
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 »

getting more and more strange.. from todays update deluged asked for libtorrent 1.2 ..I added the above mentioned repository https://code.launchpad.net/~libtorrent. ... 1.2-daily/ and updated... now when I'm try to run deluged I get following:

Code: Select all

deluged -d  
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.dev7679', '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'
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 »

Yeah new changes in development required a move to lt 1.2.

Can you detail your OS and how you installed Deluge and libtorrent. I will try to look into this week
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 have tried on a Linux Mint 20.3 Cinnamon (Ubuntu 20.04) doing the following:
- sudo add-apt-repository ppa:deluge-team/develop
- sudo pip install libtorrent==2.0.*
- sudo apt install Deluge
- sudo apt install Deluged

This gets me:
- 2.1.1~dev7681+8ece03677-202202150216~ubuntu20.04.1
- Libtorrent: 2.0.5.0

Deluge starts apparently OK, but when I change to thin client and accept restart, then Deluge just "hangs" and needs to be Killed.
I can now start Deluge and it is running en "thin client mode".
It looks like everything is running but no torrent can be loaded.
When you try to "Quit and shut down Daemon" nothing happens - the GUI just sits there and the processes keep running.
Normal Quit closes the GUI + Deluge process works.
Switching back to "Standalone" mode does the same - it is not possible to close the program (GUI + process) the normal way.

After removing Deluge 2.1.1 and going back to standard repository I get Deluge 2.0.5 with Libtorrent 2.0.5.0 and everything seems to work.

I am not really sure if anything of the above helps, but I can reproduce the behaviour.
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 »

Next step - a complete new Ubuntu 20.04.3 server, Libtorrent 2.0.5.0 and latest Deluged dev version.
Same story when adding a torrent, no torrent file saved and no download begins.

I get this error:
Traceback (most recent call last):
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 1267, in run
self.mainLoop()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1276, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 902, 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'

Traceback (most recent call last):
-bash: syntax error near unexpected token `most'
gp@u-202-s:~$ 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 1267, in run
self.mainLoop()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1276, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 902, 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'

Command 'File' not found, did you mean:

command 'file' from deb file (1:5.38-4)
command 'vile' from deb vile (9.8t-3build1)
command 'kile' from deb kile (4:2.9.93-1build1)
command 'zile' from deb zile (2.4.14-7build1)

Try: sudo apt install <deb name>

gp@u-202-s:~$ daemon.start()
> File "/usr/lib/python3/dist-packages/deluge/core/daemon.py", line 161, in start
-bash: syntax error near unexpected token `File'
gp@u-202-s:~$ reactor.run()
> File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1267, in run
-bash: syntax error near unexpected token `File'
gp@u-202-s:~$ self.mainLoop()
> File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1276, in mainLoop
-bash: syntax error near unexpected token `File'
gp@u-202-s:~$ self.runUntilCurrent()
> --- <exception caught here> ---
-bash: syntax error near unexpected token `---'
gp@u-202-s:~$ File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 902, in runUntilCurrent

Command 'File' not found, did you mean:

command 'kile' from deb kile (4:2.9.93-1build1)
command 'zile' from deb zile (2.4.14-7build1)
command 'vile' from deb vile (9.8t-3build1)
command 'file' from deb file (1:5.38-4)

Try: sudo apt install <deb name>

gp@u-202-s:~$ call.func(*call.args, **call.kw)
-bash: syntax error near unexpected token `*call.args,'
gp@u-202-s:~$ File "/usr/lib/python3/dist-packages/deluge/decorators.py", line 191, in activate

Command 'File' not found, did you mean:

command 'zile' from deb zile (2.4.14-7build1)
command 'kile' from deb kile (4:2.9.93-1build1)
command 'vile' from deb vile (9.8t-3build1)
command 'file' from deb file (1:5.38-4)

Try: sudo apt install <deb name>

gp@u-202-s:~$ d = defer.Deferred.fromCoroutine(self.coro)
-bash: syntax error near unexpected token `('
gp@u-202-s:~$ builtins.AttributeError: type object 'Deferred' has no attribute 'fromCoroutine'
builtins.AttributeError:: command not found



I hope the above exception give you a clue as to what happens
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 »

The last input to day ;)

I enabled the autoadd plugin and saved the torrent filen in this folder.
Now the download starts, but all values in the transfer window is blank except for the "progress" bar.
The Progress Bar changes status, but the actual progress during download is not shown.

All the tabs at the bottom works, except for the Options tab which is strangely "un-initialized".
Download Speed, Upload Speed, Connections, Upload Slots (and so on) are all shown with value = 0
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 »

Sorry, one last report.

During seeding (after adding and downloading of torrent) I get this error on a regular basis:
Unhandled Error
Traceback (most recent call last):
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 1267, in run
self.mainLoop()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1276, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 902, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/usr/lib/python3/dist-packages/deluge/core/rpcserver.py", line 347, in dispatch
ret.addCallbacks(on_success, on_fail)
File "/usr/lib/python3/dist-packages/deluge/decorators.py", line 196, in addCallbacks
self.activate()
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'


The same error is repeated and repeated and repeated.
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 not Cas, but thanks for detailed report.

I was just coming here to post that I couldn't reproduce on neither arch-linux, ubuntu 21.10 or Win10, running latest dev snapshot and libtorrent 2.0.5. I just 'sudo pip install git+https://github.com/deluge-torrent/deluge' to get latest develop branch, but also tested with PPA method afterwards(note the PPA includes libtorrent 1.1.x @Cas).

Anyway, see now your new post, and helpfull log, so seemingly this is a conflict, in certain cases, with commit done 9 days ago, made by gazpachoking here, or atleast i'm guessing strongly: https://github.com/deluge-torrent/delug ... d2c9d5b92a

Untill fixed, then if wanted, then here's a snapshot of develop branch with said commit reverted, plus another depending on it, and a third to avoid merge conflict: (EDIT: Removed URL as improper build, needs more reverted, but not important as Cas mentions proper fix in next post i.e. upgrade twisted over 18.9.0)

Code: Select all

martin@arch ~/Downloads % git clone https://github.com/deluge-torrent/deluge  
Cloning into 'deluge'...
remote: Enumerating objects: 98948, done.
remote: Counting objects: 100% (1938/1938), done.
remote: Compressing objects: 100% (802/802), done.
remote: Total 98948 (delta 1215), reused 1673 (delta 1103), pack-reused 97010
Receiving objects: 100% (98948/98948), 62.21 MiB | 15.40 MiB/s, done.
Resolving deltas: 100% (70646/70646), done.
martin@arch ~/Downloads % cd deluge 
martin@arch ~/Downloads/deluge
 % git revert b76f2c0 --no-edit
[develop 268a30e7f] Revert "[Decorators] Add maybe_coroutine decorator"
 Date: Tue Feb 15 20:20:15 2022 +0100
 2 files changed, 267 deletions(-)
 delete mode 100644 deluge/tests/test_maybe_coroutine.py
martin@arch ~/Downloads/deluge
 % git revert dabb505 --no-edit 
Auto-merging docs/source/conf.py
[develop 02c91349c] Revert "[Core] Document all exported core methods with type hints"
 Date: Tue Feb 15 20:21:01 2022 +0100
 4 files changed, 170 insertions(+), 166 deletions(-)
martin@arch ~/Downloads/deluge
 % git revert 2fb4134 --no-edit
Auto-merging deluge/core/torrentmanager.py
[develop 3aad0b2c3] Revert "[Core] Convert inlineCallbacks to maybe_coroutine"
 Date: Tue Feb 15 20:21:32 2022 +0100
 3 files changed, 27 insertions(+), 20 deletions(-)
Alternatively, here's develop, hard-reset to the commit just before the offending one: https://paste.c-net.org/MariannePrecogs

In both cases, they are installed easiest, if wanted of-course, through 'sudo pip install <filename.zip>'.

You probably should make ticket about it, but anyway, sorry have no other help to offer than workarounds.

Btw, I tested thinclient and standalone-mode, with latest arch-linux magnet-URI loaded/deleted each time.

Thanks again, hopefully Cas and co can look into it for you/us :)
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 »

builtins.AttributeError: type object 'Deferred' has no attribute 'fromCoroutine'

This error suggests an old version of Twisted is being used, I have not seen any issues like this on Ubuntu so far and without being to replicate this is going to be tricky to debug.
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 »

Thanks Cas! indeed I can finally reproduce now, with downgrading twisted to the one of jeps distro(ubuntu 20.04.3 LTS), so 18.9.0 - Also now states as error in terminal: 'deluge.error.NotAuthrorizedError: Auth level too low: 0 < 5', hence no ability adding torrents seemingly. Upgrading to 19.2.0 and up, fixes it.

@all, as per jeps and Cas's help, if using develop, then because of commit b76f2c0 9 days ago as mentioned before, then you need twisted over 18.9.0.

Last, just noticed there's issue with the first zip I previously posted, with reverted commits, as seemingly one more need reverted, as removed function referenced in gtkui still, so I edited that URL out, though the next hard-reset zip posted from commit just before b76f2c0, works fine with old twisted, though not important now, as we learned from Cas that simply upgrading twisted is the more propper fix, well actual fix, as mine wasen't, thanks again jeps and Cas, as good info to bring up indeed.
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 »

Looks like we are close to getting a solution.

Standard Twisted version in Ubuntu 20.04 is (as mhertz wrote) 18.9.0, is there any way to get this updated?
It is correct that Deluge dev PPA offers Libtorrent 1.1.12 as I wrote earlier (and mhertz confirmed) if the user doesn't manually upgrade to newer version.

If I am not able to upgrade Twisted when will a new dev build be available with a fix?
Post Reply