Opened 5 years ago
Closed 4 years ago
#3309 closed bug (Fixed)
TypeError: '>' not supported between instances of 'NoneType' and 'str'
Reported by: | Alexander Kurakin | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 2.0.4 |
Component: | GTK UI | Version: | 2.0.3 |
Keywords: | Cc: | kuraga333@mail.ru, scott@sremick.net |
Description
At start:
TypeError: '>' not supported between instances of 'NoneType' and 'str' Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/deluge/ui/gtk3/listview.py", line 233, in stabilized result = sort_func(model, iter1, iter2, data) File "/usr/lib64/python3.6/site-packages/deluge/ui/gtk3/torrentview.py", line 106, in progress_sort return cmp(state1, state2) File "/usr/lib64/python3.6/site-packages/deluge/ui/gtk3/common.py", line 45, in cmp return (x > y) - (x < y)
Seems like number of this messages correlates with number of torrents...
Change History (11)
comment:2 by , 5 years ago
Milestone: | needs verified → 2.x |
---|---|
Priority: | minor → blocker |
comment:3 by , 5 years ago
Milestone: | 2.x → 2.0.4 |
---|
There is a related ticket #3330 which has a TypeError comparing None
and None
so the issue is due to string type checking by Python 3. So the cmp
function needs to be able to handle either or both values being None
by converting to appropriate type before comparison.
comment:5 by , 4 years ago
I hoped there would be an update since this error makes Deluge 2 totally unusable however I lost hope and stick with Deluge 1.3 that it is stable and functional.
comment:6 by , 4 years ago
https://portingguide.readthedocs.io/en/latest/comparisons.html
Here's a guide in how to port python 2 comparison operations to python 3.
comment:7 by , 4 years ago
Another person bitten by this. I don't understand how I triggered it. Deluge had been working fine, I messed some things up w/ Python then fixed that, but now Deluge won't start. Mine is more like ticket 3330 where I'm getting "TypeError: '>' not supported between instances of 'NoneType' and 'NoneType'" like that user.
Is there even a workaround or hack so I can become functional again in the meantime?
comment:8 by , 4 years ago
Cc: | added |
---|
comment:9 by , 4 years ago
Same error on my system, deluge closes itself after a lot of those "TypeError" messages.
Info: deluge 2.0.3 | libtorrent: 1.1.13.0 | Python: 3.8.2 | OS: Linux Mint 20 MATE
comment:11 by , 4 years ago
Resolution: | → Fixed |
---|---|
Status: | new → closed |
I have the same error as kuraga, I report here the result of my investigation.
Problem
The list of torrents takes time to load at startup with the current version of Deluge 2.0.3 from the offical ppa deluge-stable installed for Ubuntu 18.04 Bionic.
The problem seems located in the GTK UI component of Deluge and it leads to too many open files error. It seems to be a problem of passing a null parameter to the cmp function in
deluge/ui/gtk3/common.py
.I have around 60 torrents, seeded correctly with Deluge 1.3 or Transmission.
Reproduce error
After a successful fresh install of Deluge 2.0 and a first start in standalone mode without any error, I add torrents in seed manually via
menu -> File -> Add Torrent
everything seems right so far. Then I close and restart Deluge. It starts with an empty list of torrent and it takes several seconds to load them. It may sometimes crash at this point or just run slowly and starts to use more and more CPU ressources.To track the problem you can watch in your system log file (personally I use
journalctl
) or just start Deluge in terminal and see the error.This error is repeated houndreds of times
And finally the last line of error is:
[ERROR ][deluge.core.torrentmanager :1132] Unable to save torrents.fastresume: [Errno 24] Too many open files: '/home/username/.config/deluge/state/torrents.fastresume.tmp'
Diagnostic
I have installed the package
deluge 2.0.3-2~201906121747~ubuntu18.04.1
provided by theppa:deluge-team/stable
for Ubuntu 18.04 Bionic, Python 3.6 is used to run Deluge withlibtorrent: 1.1.5.0
Prior to the installation of Deluge 2.0.3, I have purged all packages related to Deluge 1.3 from the universe repository of Ubuntu:
deluge deluge-common deluge-gtk
and moved my~/.config/deluge
I run the command
deluge -L=debug -l=deluge_debug --profile=deluge_profile &!
to report information about the bug. The following are extracts fromdeluge_debug
that might help to track the problem.Around line 397 and repeated sometimes in the rest of log after:
Something weird happens, around line 516 everything seems fines:
in between all torrent seems to be loaded correctly and latter:
however it is a bit contradictory with the message received in standard error output:
[ERROR ][deluge.core.torrentmanager :1132] Unable to save torrents.fastresume: [Errno 24] Too many open files: '/home/username/.config/deluge/state/torrents.fastresume.tmp'
In the end the log is full of:
09:38:56 [DEBUG ][deluge.core.alertmanager :130 ] listen_failed_alert: listening on 0.0.0.0 : 0.0.0.0:50964 failed: [accept] [TCP] Too many open files