Deluge container crashes when checking torrent with special characters

Deluge docker arm64 crashes when checking torrents files that contain specific (in my case) portuguese characters such as Á, Ò, Ê, Ç, Õ. At least that’s what I think it’s happening.

The steps I take are:
1-Add torrent in Paused State do Deluge
2-Set the files folder for said torrent
3-Force Recheck torrent
4-Container crashes with this error output:

Unhandled error in Deferred:

Traceback (most recent call last):

  File "/usr/lib/python3.11/site-packages/twisted/internet/base.py", line 1318, in run

    self.mainLoop()

  File "/usr/lib/python3.11/site-packages/twisted/internet/base.py", line 1328, in mainLoop

    reactorBaseSelf.runUntilCurrent()

  File "/usr/lib/python3.11/site-packages/twisted/internet/base.py", line 994, in runUntilCurrent

    call.func(*call.args, **call.kw)

  File "/usr/lib/python3.11/site-packages/twisted/internet/task.py", line 251, in __call__

    d = maybeDeferred(self.f, *self.a, **self.kw)

--- <exception caught here> ---

  File "/usr/lib/python3.11/site-packages/twisted/internet/defer.py", line 206, in maybeDeferred

    result = f(*args, **kwargs)

  File "/usr/lib/python3.11/site-packages/deluge/core/alertmanager.py", line 60, in update

    self.handle_alerts()

  File "/usr/lib/python3.11/site-packages/deluge/core/alertmanager.py", line 128, in handle_alerts

    **{

  File "/usr/lib/python3.11/site-packages/deluge/core/alertmanager.py", line 129, in <dictcomp>

    attr: getattr(alert, attr)

builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 11: invalid continuation byte

Unhandled Error

Traceback (most recent call last):

  File "/usr/lib/python3.11/site-packages/deluge/core/daemon_entry.py", line 119, in run_daemon

    daemon.start()

  File "/usr/lib/python3.11/site-packages/deluge/core/daemon.py", line 161, in start

    reactor.run()

  File "/usr/lib/python3.11/site-packages/twisted/internet/base.py", line 1318, in run

    self.mainLoop()

  File "/usr/lib/python3.11/site-packages/twisted/internet/base.py", line 1328, in mainLoop

    reactorBaseSelf.runUntilCurrent()

--- <exception caught here> ---

  File "/usr/lib/python3.11/site-packages/twisted/internet/base.py", line 994, in runUntilCurrent

    call.func(*call.args, **call.kw)

  File "/usr/lib/python3.11/site-packages/deluge/core/torrentmanager.py", line 1397, in on_alert_tracker_error

    for tracker in torrent.handle.trackers():

builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 11: invalid continuation byte

Unhandled Error

Traceback (most recent call last):

  File "/usr/lib/python3.11/site-packages/deluge/core/daemon_entry.py", line 119, in run_daemon

    daemon.start()

  File "/usr/lib/python3.11/site-packages/deluge/core/daemon.py", line 161, in start

    reactor.run()

  File "/usr/lib/python3.11/site-packages/twisted/internet/base.py", line 1318, in run

    self.mainLoop()

  File "/usr/lib/python3.11/site-packages/twisted/internet/base.py", line 1328, in mainLoop

    reactorBaseSelf.runUntilCurrent()

--- <exception caught here> ---

  File "/usr/lib/python3.11/site-packages/twisted/internet/base.py", line 994, in runUntilCurrent

    call.func(*call.args, **call.kw)

  File "/usr/lib/python3.11/site-packages/deluge/core/torrentmanager.py", line 1397, in on_alert_tracker_error

    for tracker in torrent.handle.trackers():

builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 11: invalid continuation byte

I’ve tried this same steps with the same torrent with special characters in a native linux install (Deluge 2.0.3, libtorrent 1.2.9.0) and it didn’t reproduce the error there, everything went smoothly.

Anything I can do to keep using Deluge with this kind of torrents?

Anyone knows if this can be worked on?

Does the issue present when using the application outside of docker? ie, is this a container issue or an application issue.

disregard i clearly can’t read.

You should open a github issue and we can take a look at it. I wouldn’t expect anything fast, you’re the only user to ever report this and the error isn’t super helpful in narrowing down the cause. It looks like something should be latin1 rather than utf8… but …

actually it looks like this has been an ongoing issue without resolution for a while…

UnicodeDecodeError on Deluge 2.0.3 - Deluge Forum (deluge-torrent.org)

#3427 (builtins.UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xe4 in position 0: invalid continuation byte – version 2.0.4.dev38+g23a48dd01-2) – Deluge (deluge-torrent.org)

Bugs in WebUI of 2.0.3? - Deluge Forum (deluge-torrent.org)

[Support] binhex - DelugeVPN - Page 191 - Docker Containers - Unraid

i also just noticed that you’re comparing the most updated deluge to a version that is old (Deluge 2.0.3, libtorrent 1.2.9.0) , if that version works as expected you should use the tag that gives you that version until deluge fixes the issue

The Deluge app inside the container crashes until the files are erased from disk and the container restarted.

Since I made the test and the native Deluge app worked, I thought this was an issue with how the container was built. Maybe missing some dependency to deal with different characters.

The torrent that gave this problem is long gone.
Now trying other torrents on Deluge with similar special characters and it seems to work fine. Maybe it was just that one torrent and it had some different characters.