Value crashes with python

General support for problems installing or using Deluge
Post Reply
isaaclw
New User
New User
Posts: 2
Joined: Mon Dec 22, 2025 12:33 am

Value crashes with python

Post by isaaclw »

I've been using deluge-console as a way to mass update my torrents. For some reason deluge-gtk has not been great at performing mass updates.

However, it seems like some of my data has been "affected".

Deluge is crashing with this error:

Code: Select all


Dec 21 19:25:56 bittorrent start_deluged.sh[1385]: Unhandled error in Deferred:
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]: Traceback (most recent call last):
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1088, in _runCallbacks
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:     current.result = callback(  # type: ignore[misc]
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:   File "/usr/lib/python3/dist-packages/twisted/internet/task.py", line 872, in cb
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:     return callable(*args, **kw)
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:   File "/usr/lib/python3/dist-packages/deluge/core/torrentmanager.py", line 1258, in on_alert_add_torrent
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:     self.add_async_callback(alert.handle, *add_async_params)
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:   File "/usr/lib/python3/dist-packages/deluge/core/torrentmanager.py", line 697, in add_async_callback
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:     torrent = self._add_torrent_obj(
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:   File "/usr/lib/python3/dist-packages/deluge/core/torrentmanager.py", line 656, in _add_torrent_obj
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:     torrent.resume()
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:   File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 1240, in resume
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]:     and self.get_ratio() >= self.options['stop_ratio']
Dec 21 19:25:56 bittorrent start_deluged.sh[1385]: builtins.TypeError: '>=' not supported between instances of 'float' and 'str'

I'm on debian trixie:

Code: Select all

 *** 2.2.0-1 500
        500 http://deb.debian.org/debian trixie/main amd64 Packages
isaaclw
New User
New User
Posts: 2
Joined: Mon Dec 22, 2025 12:33 am

Re: Value crashes with python

Post by isaaclw »

I've just be wrapping any case of this bug: `self.options['stop_ratio']` with 'float()`; which has been fixing it, but each time I do I have to restart.

And of course on updates, that's lost.

I realize the developers probably assume that the data that is inside the application is guaranteed to be a certain type, but with a few different apps handling this data, it would be nice (from my perspective) if the data was sanitized *on load* (from whatever config) and then treated safe after that point.
Post Reply