Autoadd 'ascii' codec can't decode byte 0xc3

General support for problems installing or using Deluge
Monoix

Re: 'ascii' codec can't decode byte 0xc3

Post by Monoix »

I'm having this error too, torrents with non ascii characters in the file name can't be loaded via the auto add plugin. (core:256 Unable to auto add torrent due to improper filename encoding: 'ascii' codec can't decode byte 0xd0 in position 1: ordinal not in range(128) for example.) When renaming the file and removing the offending characters from the file name, the torrent loads fine. I'm using 1.3.11 on Linux Mint 17.

Searching for this error, it seems locale for the deluge daemon when it start would be wrong: http://dev.deluge-torrent.org/ticket/1983 and http://dev.deluge-torrent.org/ticket/1981 - "I think it is working. I've set LC_ALL in /etc/init/deluge.conf"

So - is it likely that it is this problem, and how do you do set locale in the script if so?


My scripts are from http://dev.deluge-torrent.org/wiki/User ... ce/Upstart with the changes of uid and gid set to my own user and group.

Code: Select all

# deluged - Deluge daemon
#
# The daemon component of Deluge BitTorrent client. Deluge UI clients
# connect to this daemon via DelugeRPC protocol.

description "Deluge daemon"
author "Deluge Team"

start on filesystem and static-network-up
stop on runlevel [016]

respawn
respawn limit 5 30

env uid=deluge
env gid=deluge
env umask=007

exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d -l /var/log/deluge/daemon.log -L warning

I first checked my own locale, and everything was utf-8. (Since I'm Swedish I had some Swedish variables, like numbers and dates, but main system language is English. I think that was configured during installation.) After reading http://askubuntu.com/questions/162391/h ... cale-issue I set LC_ALL=en_US.UTF-8 in /etc/default/locale which promptly set all locale variables to English after a reboot. No difference for deluge though, the torrent with odd letters in the file name refused to load.

I then added export LC_ALL=en_US.UTF-8 to a line above the exec command in the conf file, not sure if that's correct, but nothing special happened anyway... deluged started fine, but still couldn't load any non-ascii files.

So - any suggestions on what to do to get files with non-ascii characters in the filename to load? I just don't get it.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Autoadd 'ascii' codec can't decode byte 0xc3

Post by Cas »

Did you test running deluged without using the service files as your user? There is a LANG env var that might need set. Did you also see my last comment in ticket #1983.
Post Reply