unmappable characters and other AMC questions

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
angst
Posts: 6
Joined: 18 Mar 2013, 00:55

unmappable characters and other AMC questions

Post by angst »

InvalidPathException: Malformed input or input contains unmappable chacraters: /mnt/video2/Plex/Movies/Les Mis?rables (2012)/Les Mis?rables

This is from running the AMC script in a Ubuntu 12.10 server.

any ideas?

Another error, as i clean up, i see one of my movies had a folder with Subs in it containing a single rar file that was not extracted and not deleted on the -- def clean=yes.

Another error, it seems like folders with spaces in names are not able to be deleted by the script. Thoughts on that?

Must be related, some of the things in my library have been renamed with apostrophes, but apparently not the same character in my system. I cannot use my keyboard or even the tab key to autocomplete the entry to CLI into the folder. Plex still finds the media, but at somepoint I will want to delete. this is probably something simple, but i searched the forums and don't see anybody else struggling with this. Most stuff just "works" great, which prompted me to run my whole TV library through to clean it up.

Angst
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: unmappable characters and other AMC questions

Post by rednoah »

FAQ wrote:Q: I'm running FileBot on a Linux machine and non-ASCII characters get all messed up. Why do unicode characters not work?
A: On some machines the locale is not set up. You'll need to tell Java what charset filenames are encoded with by setting the environment variable LANG. Also if you get an InvalidPathException about unmappable characters then it could very well be because LANG is not set up correctly.

Code: Select all

export LANG=en_US.utf8
Possibly related to this. Also make sure to use the latest Java 7.

Try this and send me the output:

Code: Select all

filebot -script fn:sysenv
angst wrote:Another error, it seems like folders with spaces in names are not able to be deleted by the script. Thoughts on that?
Don't think so. What's the console output? Also archives never get deleted. Only files extracted from archives.
:idea: Please read the FAQ and How to Request Help.
angst
Posts: 6
Joined: 18 Mar 2013, 00:55

Re: unmappable characters and other AMC questions

Post by angst »

Not sure why, but some empty folders are left over. It might be a permission issue. I will experiment with this. I use plex, and I was chmod'ing the files to 777 and chown'ing them plex:plex to make them all deletable by the roku client once per day. The AMC script is running as root on my .processing folder in a cron job twice a day, and also called by deluge when torrents complete, so I'd think that would not be a problem.

To solve the accumulation of archives I blocked downloading them in flexget for the time being. I really wouldn't mind downloading archives, if they would delete after successful extraction, but don't like having to waste disk space. I tried your script:

#!/bin/bash
filebot -script "g:args.getFiles{ it.isArchive() }*.delete()" /mnt/video2/.processing/

but it did not work for me. It executes, but just says done and the archives remain. I don't see the value in compressing the video files to archives, doesn't seem to accomplish much savings since there is already video compression.

I appreciate your help!

Thanks,

angst
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: unmappable characters and other AMC questions

Post by rednoah »

Yep, archives don't make sense at all. The reason the amc script is not deleting them is because that's the files that get seeded.

That script will definitely work on any *.zip *.rar etc archives. It'll delete archive files only, not folders, as it's a one-liner. The cleaner script will be more comprehensive.

What I meant with log is that the amc script will say like "Delete /folder" so you mean you see that i tried to delete it, but the file/folder is still there?
:idea: Please read the FAQ and How to Request Help.
angst
Posts: 6
Joined: 18 Mar 2013, 00:55

Re: unmappable characters and other AMC questions

Post by angst »

Sent a PM with output of filebot -script fn:sysenv Still having the problem with characters, but the output of locales looks like i am set up correctly, no?

I am running the command in webmin as a cron job, the output did say delete, but if I recall there were several question ?marks? around done. I will pay more attention next time I notice it. I took my whole TV library and ran it through manually, and had about 10 or 12 remnant folders left in there that were empty and were 777 permission. They were owned by user plex:plex, not deluge. I have the script saved in a folder and called by deluge on completion and also twice per day by cron. Otherwise, when deluge runs the script there is no console output to see.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: unmappable characters and other AMC questions

Post by rednoah »

Yeah, if it's says that it'll use UTF-8 to encode/decode filenames.

Code: Select all

sun.jnu.encoding: UTF-8
Make sure deluge is also using UTF-8 to encode/decode filenames. You'd never run into issues like that on desktop linux but not sure how bare-bones embedded linux might be configured.

If it says Done it's done. This is the actual output if the console/webui would be displaying it correctly:

Code: Select all

Done ヾ(@⌒ー⌒@)ノ
That has nothing to do with internal handling of unicode, just the webui not decoding the output with UTF-8
:idea: Please read the FAQ and How to Request Help.
Post Reply