Using deluge-console: "Error parsing command: 'ascii' codec can't encode characters"

Specific support for Deluge on Microsoft Windows OS
User avatar
New User
New User
Posts: 1
Joined: Sat Jul 29, 2017 12:04 am
OS or Distro: Windows

Using deluge-console: "Error parsing command: 'ascii' codec can't encode characters"

Postby Sugoooi » Sat Jul 29, 2017 12:21 am

Hi there! ;)
I'm trying to write a little script that uses deluge-console, and I'm bumping my head against the desk atm trying to solve this one issue that I'm having.
Well, let's get to it.

That script, which is written in NodeJS, executes a pretty simple deluged command:

Code: Select all

deluge-console "add -p 'E:\Anime\אנימות העונה\Fate\' ''"

However, this appears to be triggering the aforementioned encoding parsing error, which following a quick Google search seems to be an issue with the Python source code.

Error parsing command: 'ascii' codec can't encode characters in position 15-20: ordinal not in range(128)

I have, just in case, tried to change the active code page (CHCP 65001), play around with some registry values, and obviously the inserted input is being encoded to UTF-8 as well:

Code: Select all

with (Deluge.add({
      saveLocation: utf8.encode('E:\\Anime\\אנימות העונה\\Fate\\'),
      torrentSrc: ''
   })) {

Am I still doing something wrong, perhaps? I need this to work with non-ASCII path formats, and I have confirmed the script to work with ASCII-encoded paths.

Oh, and by the way, I couldn't get to test the script on a Unix-like OS, which is why I opened this thread specifically on this board.
This doesn't seem to be too common of an issue, and I suspect that it might have to do with the regular Windows oddities.

Return to “Windows OS”

Who is online

Users browsing this forum: No registered users and 6 guests