Page 1 of 1

InvalidPathException: Malformed input or input contains unmappable characters

Posted: 07 Aug 2017, 17:12
by Mustang
First of all thanks for an incredible product. Not only does it do a great job processing files, it has helped me learn more and more about the Linux operation system and Groovy programming. I purchased the Windows version and have donated multiple times in the past. Keep up the great work!

Right now I'm having a problem that I have not run into before. I am getting the error "InvalidPathException: Malformed input or input contains unmappable characters".

At first, I thought it was a version problem. Originally, I manually installed Filebot. I tried updating using Snap, but only get an error when trying to install via Snap, so I manually updated Filebot. New version listed below.

Unfortunately, I keep getting the above error. Here is the output from my Filebot CLI, the error and my sysinfo command.

Code: Select all

filebot -script fn:sysinfo
FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/user/.filebot/????
WARNING: sun.jnu.encoding = ANSI_X3.4-1968
GVFS: PlatformGVFS [/run/user/1000/gvfs]
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_121
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 2 GB Max Memory / 17 MB Used Memory
OS: Linux (amd64)
Package: DEB
uname: Linux rapidseedbox 2.6.32-042stab120.18 #1 SMP Fri Jan 13 10:32:04 MSK 2017 x86_64 x86_64 x86_64 GNU/Linux
Done ?(?????)?

Code: Select all

filebot -script fn:amc --output "/home/user/Filebot_Output" --action keeplink --conflict skip -non-strict "/home/user/Downloads/T-TV_Shows/Marvels.Agents.of.S.H.I.E.L.D.S04.720p.HDTV.x264-MIXED [NO RAR]" --log-file /home/user/Filebot_Output/amc-keeplink_files.log --def unsorted=y excludeList=".excludes_keeplink" --def ignore="T-Seeders|FTP_Only|T-Freeleach|T-Cartoons" --def @/home/user/Filebot_Output/PlexFormat.txt
Locking /home/user/Filebot_Output/amc-keeplink_files.log
Run script [fn:amc] at [Mon Aug 07 16:51:51 UTC 2017]
Parameter: unsorted = y
Parameter: excludeList = .excludes_keeplink
Parameter: ignore = T-Seeders|FTP_Only|T-Freeleach|T-Cartoons
Parameter: movieFormat = /home/user/Plex/Movies/{n} ({y})/{n} ({y}){' CD'+pi}{'.'+lang}
Parameter: seriesFormat = /home/user/Plex/TV Shows/{n} ({y})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[`??????????]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}
Argument[0]: /home/user/Downloads/T-TV_Shows/Marvels.Agents.of.S.H.I.E.L.D.S04.720p.HDTV.x264-MIXED [NO RAR]
Use excludes: /home/user/Filebot_Output/.excludes_keeplink (6513)
Input: /home/user/Downloads/T-TV_Shows/Marvels.Agents.of.S.H.I.E.L.D.S04.720p.HDTV.x264-MIXED [NO RAR]/Marvels.Agents.of.S.H.I.E.L.D.S04.720p.HDTV.x264-MIXED [NO RAR]/Marvels.Agents.of.S.H.I.E.L.D.S04E22.720p.HDTV.x264-KILLERS.mkv
Group: [tvs:marvels agents of s h i e l d] => [Marvels.Agents.of.S.H.I.E.L.D.S04E22.720p.HDTV.x264-KILLERS.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Marvels Agents of S H I E L D]
Fetching episode data for [Marvel's Agents of S.H.I.E.L.D.]
[KEEPLINK] From [/home/user/Downloads/T-TV_Shows/Marvels.Agents.of.S.H.I.E.L.D.S04.720p.HDTV.x264-MIXED [NO RAR]/Marvels.Agents.of.S.H.I.E.L.D.S04.720p.HDTV.x264-MIXED [NO RAR]/Marvels.Agents.of.S.H.I.E.L.D.S04E22.720p.HDTV.x264-KILLERS.mkv] to [/home/user/Plex/TV Shows/Marvel's Agents of S.H.I.E.L.D. (2013)/Season 04/Marvel's Agents of S.H.I.E.L.D. - S04E22 - World?s End.mkv]
Processed 0 files
InvalidPathException: Malformed input or input contains unmappable characters: /home/user/Plex/TV Shows/Marvel's Agents of S.H.I.E.L.D. (2013)/Season 04/Marvel's Agents of S.H.I.E.L.D. - S04E22 - World?s End.mkv
Processing 1 unsorted files
[KEEPLINK] From [/home/user/Downloads/T-TV_Shows/Marvels.Agents.of.S.H.I.E.L.D.S04.720p.HDTV.x264-MIXED [NO RAR]/Marvels.Agents.of.S.H.I.E.L.D.S04.720p.HDTV.x264-MIXED [NO RAR]/Marvels.Agents.of.S.H.I.E.L.D.S04E22.720p.HDTV.x264-KILLERS.mkv] to [/home/user/Filebot_Output/Unsorted/Marvels.Agents.of.S.H.I.E.L.D.S04.720p.HDTV.x264-MIXED [NO RAR]/Marvels.Agents.of.S.H.I.E.L.D.S04.720p.HDTV.x264-MIXED [NO RAR]/Marvels.Agents.of.S.H.I.E.L.D.S04E22.720p.HDTV.x264-KILLERS.mkv]
Processed 1 files
Done ?(?????)?
Thanks in advance for your help. Although errors are pain in the butt, they are a great way to learn more.
Cheers!

Re: InvalidPathException: Malformed input or input contains unmappable characters

Posted: 08 Aug 2017, 02:19
by rednoah
Sounds like the locale isn't set correctly on your machine:

Code: Select all

Unicode Filesystem: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/user/.filebot/????
WARNING: sun.jnu.encoding = ANSI_X3.4-1968
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?
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. 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.UTF-8"
export LC_ALL="en_US.UTF-8"

Re: InvalidPathException: Malformed input or input contains unmappable characters

Posted: 08 Aug 2017, 18:09
by Mustang
Thanks for the quick reply rednoah.

I read that in the FAQ and entered those two commands. Sorry, I didn't mention that. Was I supposed to do something other than just type in those two "export" commands?

Re: InvalidPathException: Malformed input or input contains unmappable characters

Posted: 08 Aug 2017, 19:41
by rednoah
sun.jnu.encoding = ANSI_X3.4-1968 means that your filesystem encoding is set to ASCII and not UTF-8 as one would expect.

Are you sure that the locale environment variables are set correctly when filebot is called? The export command will set variables for the current shell session only, and not the entire system forever.

Re: InvalidPathException: Malformed input or input contains unmappable characters

Posted: 10 Aug 2017, 18:53
by Mustang
That's it!

Again, quite the learning experience for me, albeit a bit frustrating.

I figured out how to change the system language permanently. I need to run a test file, but the Filebot sysinfo looks good.

Code: Select all

filebot -script fn:sysinfo
FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: PlatformGVFS [/run/user/1000/gvfs]
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_121
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 2 GB Max Memory / 17 MB Used Memory
OS: Linux (amd64)
Package: DEB
uname: Linux rapidseedbox 2.6.32-042stab120.18 #1 SMP Fri Jan 13 10:32:04 MSK 2017 x86_64 x86_64 x86_64 GNU/Linux
Done 
Now on to my next question, but I'll start a new thread.

Re: InvalidPathException: Malformed input or input contains unmappable characters

Posted: 11 Aug 2017, 06:26
by rednoah
It's very unfortunate that many hosting providers don't properly configure their stripped-down Linux boxes.

You would never run into these kind of issues on standard Ubuntu systems. ;)