Opened 3 years ago

Last modified 2 years ago

#3461 new bug

Filenames with unicode not working

Reported by: razaq Owned by:
Priority: minor Milestone: 2.1.1
Component: Unknown Version: 2.0.3
Keywords: unicode, filename, file name Cc:


If a file name contains a unicode character, deluge 2.0.3 will not add that torrent (errors in logs). Previous versions of deluge (for example 1.3.X) allowed adding the torrent and simply renamed the file on the harddrive.

Allow adding torrents with unicode chars in the name again by either natively supporting it or by renaming the file in question like deluge 1.3.X did.

Change History (5)

comment:1 by Calum, 3 years ago

Please provide the log

comment:2 by razaq, 3 years ago

00:35:03 [CRITICAL][twisted                       :154 ] Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/deluge/core/", line 122, in run_daemon
  File "/usr/lib/python3.9/site-packages/deluge/core/", line 164, in start
  File "/usr/lib/python3.9/site-packages/twisted/internet/", line 1283, in run
  File "/usr/lib/python3.9/site-packages/twisted/internet/", line 1292, in mainLoop
--- <exception caught here> ---
  File "/usr/lib/python3.9/site-packages/twisted/internet/", line 913, in runUntilCurrent
    call.func(*call.args, **
  File "/usr/lib/python3.9/site-packages/deluge/core/", line 1258, in on_alert_add_torrent
    self.add_async_callback(alert.handle, *add_async_params)
  File "/usr/lib/python3.9/site-packages/deluge/core/", line 697, in add_async_callback
    torrent = self._add_torrent_obj(
  File "/usr/lib/python3.9/site-packages/deluge/core/", line 639, in _add_torrent_obj
    torrent = Torrent(handle, options, state, filename, magnet)
  File "/usr/lib/python3.9/site-packages/deluge/core/", line 283, in __init__
  File "/usr/lib/python3.9/site-packages/deluge/core/", line 315, in set_options
  File "/usr/lib/python3.9/site-packages/deluge/core/", line 515, in set_file_priorities
    if file_priorities and len(file_priorities) == len(self.get_files()):
  File "/usr/lib/python3.9/site-packages/deluge/core/", line 770, in get_files
    return convert_lt_files(files)
  File "/usr/lib/python3.9/site-packages/deluge/core/", line 114, in convert_lt_files
    file_path = _file.path.decode('utf8')
builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 41: invalid continuation byte

file that is causing this is named í ½í¸± (not sure why its named like that)

should be pretty easy to reproduce and fix

Version 5, edited 3 years ago by razaq (previous) (next) (diff)

comment:3 by Calum, 2 years ago

Milestone: needs verified2.1.0

comment:4 by Calum, 2 years ago

Can you provide the problem torrent file? This looks like an encoding issue with the torrent

comment:5 by Calum, 2 years ago


Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.