Opened 6 years ago

Closed 6 years ago

#3212 closed bug (Fixed)

UnicodeDecodeError in common.get_default_download_dir

Reported by: Cas Owned by: Cas
Priority: major Milestone: 2.0.0
Component: Core Version: develop
Keywords: Cc:

Description

From forum: https://forum.deluge-torrent.org/viewtopic.php?f=8&p=228974&sid=0dc2019d419175b43045df9d52efe1a2#p228974

~$ deluge
Traceback (most recent call last):
  File "/usr/bin/deluge", line 11, in <module>
    load_entry_point('deluge==2.0.0.dev7379', 'gui_scripts', 'deluge')()
  File "/usr/lib/python2.7/dist-packages/deluge/ui/ui_entry.py", line 143, in start_ui
    ui.start()
  File "/usr/lib/python2.7/dist-packages/deluge/ui/gtk3/__init__.py", line 43, in start
    from .gtkui import GtkUI
  File "/usr/lib/python2.7/dist-packages/deluge/ui/gtk3/gtkui.py", line 119, in <module>
    'choose_directory_dialog_path': get_default_download_dir(),
  File "/usr/lib/python2.7/dist-packages/deluge/common.py", line 152, in get_default_download_dir
    if not line.startswith('#') and line.startswith('XDG_DOWNLOAD_DIR'):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 23: ordinal not in range(128)

Change History (2)

comment:1 Changed 6 years ago by Cas

  • Owner set to Cas
  • Status changed from new to assigned

The issue will be due to non-ascii characters in the user-dirs.dirs file.

Using io.open with encoding='utf8' should suffice to fix it.

Last edited 6 years ago by Cas (previous) (diff)

comment:2 Changed 6 years ago by Cas

  • Resolution set to Fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.