#3309: TypeError: '>' not supported between instances of 'NoneType' and 'str'
---------------------+----------------------------
Reporter: kuraga | Owner:
Type: bug | Status: new
Priority: minor | Milestone: needs verified
Component: GTK UI | Version: 2.0.3
Resolution: | Keywords:
---------------------+----------------------------
Changes (by milto):
* component: Unknown => GTK UI
Comment:
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 1.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
{{{#!div style="font-size: 80%"
{{{#!console
Original exception was:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/listview.py", line
233, in stabilized
File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/listview.py", line
250, in generic_sort_func
File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/common.py", line 45,
in cmp
TypeError: '>' not supported between instances of 'str' and 'NoneType'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/listview.py", line
233, in stabilized
File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/listview.py", line
250, in generic_sort_func
File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/common.py", line 45,
in cmp
TypeError: '>' not supported between instances of 'str' and 'NoneType'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 109,
in apport_excepthook
File "/usr/lib/python3/dist-packages/apport/report.py", line 537, in
add_proc_info
OSError: [Errno 24] Too many open files: '/proc/15418'
}}}
}}}
And finally the last line of error is:
{{{#!div style="font-size: 80%"
{{{#!console
[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 the `ppa:deluge-team/stable` for Ubuntu 18.04 Bionic, Python
3.6 is used to run Deluge with `libtorrent: 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 from `deluge_debug` that might help to track the
problem.
Around line 397 and repeated somtimes in the rest of log after:
{{{#!div style="font-size: 80%"
{{{#!console
09:37:31 [DEBUG ][deluge.core.core :651 ] Deprecated session status key
num_peers, please use peer.num_peers_connected
09:37:31 [DEBUG ][deluge.core.core :651 ] Deprecated session status key
dht_nodes, please use dht.dht_nodes
09:37:31 [DEBUG ][deluge.core.core :651 ] Deprecated session status key
has_incoming_connections, please use net.has_incoming_connections
09:37:31 [DEBUG ][deluge.core.core :651 ] Deprecated session status key
num_peers, please use peer.num_peers_connected
09:37:31 [DEBUG ][deluge.core.core :651 ] Deprecated session status key
dht_nodes, please use dht.dht_nodes
09:37:31 [DEBUG ][deluge.core.core :651 ] Deprecated session status key
has_incoming_connections, please use net.has_incoming_connections
}}}
}}}
Something weird happens, around line 516 everything seems fines:
{{{#!div style="font-size: 80%"
{{{#!console
09:37:32 [INFO ][deluge.core.torrentmanager :806 ] Loading torrent state:
/home/username/.config/deluge/state/torrents.state
09:37:32 [INFO ][deluge.core.torrentmanager :819 ] Successfully loaded
/home/username/.config/deluge/state/torrents.state
09:37:32 [INFO ][deluge.core.torrentmanager :1066] Opening
torrents.fastresume for load:
/home/username/.config/deluge/state/torrents.fastresume
09:37:32 [INFO ][deluge.core.torrentmanager :1077] Successfully loaded
torrents.fastresume:
/home/username/.config/deluge/state/torrents.fastresume
}}}
}}}
in between all torrent seems to be loaded correctly and latter:
{{{#!div style="font-size: 80%"
{{{#!console
09:37:48 [DEBUG ][deluge.core.torrentmanager :1126] Creating the temporary
file: /home/username/.config/deluge/state/torrents.fastresume.tmp
09:37:48 [DEBUG ][deluge.core.torrentmanager :1136] Creating backup of
torrents.fastresume at:
/home/username/.config/deluge/state/torrents.fastresume.bak
09:37:48 [DEBUG ][deluge.core.torrentmanager :1146] Saving
torrents.fastresume to:
/home/username/.config/deluge/state/torrents.fastresume`
}}}
}}}
however it is a bit contradictory with the message received in standard
error output:
{{{#!div style="font-size: 80%"
{{{#!console
[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:
{{{#!div style="font-size: 80%"
{{{#!console
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
}}}
}}}
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3309#comment:1>
Deluge <https://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/deluge-dev/060.243ff391c289f265644c512e227510ae%40deluge-torrent.org.