Opened 3 years ago

Last modified 20 months 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:

Description

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 Changed 3 years ago by Cas

Please provide the log

comment:2 Changed 3 years ago by razaq

00:35:03 [CRITICAL][twisted                       :154 ] Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/deluge/core/daemon_entry.py", line 122, in run_daemon
    daemon.start()
  File "/usr/lib/python3.9/site-packages/deluge/core/daemon.py", line 164, in start
    reactor.run()
  File "/usr/lib/python3.9/site-packages/twisted/internet/base.py", line 1283, in run
    self.mainLoop()
  File "/usr/lib/python3.9/site-packages/twisted/internet/base.py", line 1292, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib/python3.9/site-packages/twisted/internet/base.py", line 913, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/usr/lib/python3.9/site-packages/deluge/core/torrentmanager.py", 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/torrentmanager.py", line 697, in add_async_callback
    torrent = self._add_torrent_obj(
  File "/usr/lib/python3.9/site-packages/deluge/core/torrentmanager.py", line 639, in _add_torrent_obj
    torrent = Torrent(handle, options, state, filename, magnet)
  File "/usr/lib/python3.9/site-packages/deluge/core/torrent.py", line 283, in __init__
    self.set_options(self.options)
  File "/usr/lib/python3.9/site-packages/deluge/core/torrent.py", line 315, in set_options
    options_set_func(value)
  File "/usr/lib/python3.9/site-packages/deluge/core/torrent.py", 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/torrent.py", line 770, in get_files
    return convert_lt_files(files)
  File "/usr/lib/python3.9/site-packages/deluge/core/torrent.py", 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

deluge 2.X should be able to handle these just like version 1.3.X did

Last edited 3 years ago by razaq (previous) (diff)

comment:3 Changed 2 years ago by Cas

  • Milestone changed from needs verified to 2.1.0

comment:4 Changed 2 years ago by Cas

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

comment:5 Changed 20 months ago by Cas

  • Milestone changed from 2.1.0 to 2.1.1

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.