Page 1 of 1
amc script: "CmdlineException: No media files"
Posted: 20 Mar 2017, 16:02
by jp4500
I've been running filebot automated on the command line for a while now w/no issues. But, today I noticed 3 files weren't moved even though they seem to be in good order.
All 3 failed with the same error:
Any ideas? Did something change with the recently with the amc script? It seems like it identified the shows but just didn't find any media(?) to move even though these are .mkv files
Code: Select all
Run script [fn:amc] at [Mon Mar 20 10:48:59 CDT 2017]
Parameter: artwork = y
Parameter: excludeList = C:/LOCAL/filebot/amc.txt
Parameter: seriesFormat = Z:/TV/{n}/{n.space('.')}.S{(episode.season ? s : 1).pad(2)}E{e.pad(2)}.{t.space('.')}
Parameter: movieFormat = Z:/DVD/{n} ({y})/{n} ({y})
Argument: Z:\INCOMING
Using excludes: C:\LOCAL\filebot\amc.txt (7786)
Input: Z:\INCOMING\Homeland.S06E09.mkv
Input: Z:\INCOMING\Last.Week.Tonight.With.John.Oliver.S04E06.mkv
Input: Z:\INCOMING\Real.Time.With.Bill.Maher.2017.03.18.mkv
Group: [tvs:homeland] => [Homeland.S06E09.mkv]
Group: [tvs:last week tonight with john oliver] => [Last.Week.Tonight.With.John.Oliver.S04E06.mkv]
Group: [tvs:real time with bill maher] => [Real.Time.With.Bill.Maher.2017.03.18.mkv]
Rename episodes using [TheTVDB]
CmdlineException: No media files: [Z:\INCOMING\Homeland.S06E09.mkv]
Rename episodes using [TheTVDB]
CmdlineException: No media files: [Z:\INCOMING\Last.Week.Tonight.With.John.Oliver.S04E06.mkv]
Rename episodes using [TheTVDB]
CmdlineException: No media files: [Z:\INCOMING\Real.Time.With.Bill.Maher.2017.03.18.mkv]
Finished without processing any files
Failure (°_°)
Here's how I'm running the amc script (in case there's some issue here):
Code: Select all
"C:\Program Files\FileBot\filebot.launcher" -script fn:amc --output "Z:/" --log-file C:/LOCAL/filebot/amc.log --action move -non-strict "Z:/INCOMING" --def artwork=y excludeList=C:/LOCAL/filebot/amc.txt "seriesFormat=Z:/TV/{n}/{n.space('.')}.S{(episode.season ? s : 1).pad(2)}E{e.pad(2)}.{t.space('.')}" "movieFormat=Z:/DVD/{n} ({y})/{n} ({y})"
Re: amc script: "CmdlineException: No media files"
Posted: 20 Mar 2017, 16:21
by rednoah
Please run filebot -script fn:sysinfo and post the output.
Re: amc script: "CmdlineException: No media files"
Posted: 20 Mar 2017, 17:24
by jp4500
That command failed for me. However, just running the GUI app showed me that there was a newer version available. I updated and the command above now works.. Maybe the issue I was having was just from running an older version? I'll assume so but update if I see the issue happen again with the latest version
thanks!!
Re: amc script: "CmdlineException: No media files"
Posted: 20 Mar 2017, 17:37
by rednoah
Older versions are not supported and may or may not work.

When asking for support for any kind of software, it's considered polite to say which version you're using. Otherwise the developer will assume that you're using the latest version and then we'll just be wasting the time of everyone involved.
Re: amc script: "CmdlineException: No media files"
Posted: 20 Mar 2017, 23:55
by jmlamotte
Hi Jp,
I was facing the same issue as you were, running cli of filebot 4.5. It might have started to happen after a Java upgrade (I know I did upgrade, but I'm not sure it is linked).
In my environment, I only got the No Media File exception when trying to process files that are smaller than 250 MB.
Say my file was named Serie_Title.S01E01.mkv and 249 MB.
If I tried to run filebot on it, I will get the exception.
If I increased the size of the file to 251 MB, and ran filebot on it (same name), the script ran fine and my file was moved.
I looked at the source code, and think it might be linked to the clutter filter, as this occurred in the Rename function.
Group: [tvs:Serie_Title] => [Serie_Title.S01E01.mkv]
Processing each group
Rename episodes using [TheTVDB]
CmdlineException: No media files: [/path/to/Serie_Title.S01E01/Serie_Title.S01E01.mkv]
I tried defining number.clutter.maxfilesize to 50 MB in filebot.sh, but the result was the same.
I eventually ended upgrading to Filebot 4.7.8, and once I downloaded the new amc.groovy script, everything seems to runs as expected.
Jm
Re: amc script: "CmdlineException: No media files"
Posted: 21 Mar 2017, 06:04
by rednoah
So when an ancient version stops working, your first reaction is too look at the source instead of just trying the latest version? Serious Respect!

Re: amc script: "CmdlineException: No media files"
Posted: 11 Apr 2017, 07:22
by ukoda
Did anyone have any luck getting it working without upgrading? The most recent version does not play well with CentOS 6.9.
After cloning the the portable install-filebot.sh fails with "sha256sum: unrecognized option '--strict'" which reflects the fact that sha256sum does not have a strict option my system.
Trying to run the portable filebot.sh fails with "Error: Unable to access jarfile /root/filebot/installer/portable/FileBot.jar" and I see no FileBot.jar in the cloned download.
I would rather just fix the current install if possible as it worked great for many years.
Re: amc script: "CmdlineException: No media files"
Posted: 11 Apr 2017, 07:32
by ukoda
I did get slightly further by pulling down portable.sh, removing the strict option and it then installed but running the new version now throws the error:
Code: Select all
[root@yi portable]# ./filebot.sh -non-strict -script /etc/filebot/anime.groovy
java.util.regex.Matcher cannot be cast to java.lang.Boolean
java.lang.ClassCastException: java.util.regex.Matcher cannot be cast to java.lang.Boolean
at com.sun.proxy.$Proxy10.accept(Unknown Source)
at net.filebot.util.FileUtilities.getChildren(FileUtilities.java:480)
at net.filebot.cli.ScriptShellMethods.listFiles(ScriptShellMethods.java:84)
at net.filebot.cli.ScriptShellMethods.hasFile(ScriptShellMethods.java:134)
at Script1$_run_closure1.doCall(Script1.groovy:12)
at net.filebot.cli.ScriptShellMethods.getFolders(ScriptShellMethods.java:181)
at net.filebot.cli.ScriptShellMethods.getFolders(ScriptShellMethods.java:169)
at Script1.run(Script1.groovy:12)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:64)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:119)
at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
at net.filebot.Main.main(Main.java:115)
Failure (°_°)
Re: amc script: "CmdlineException: No media files"
Posted: 11 Apr 2017, 09:14
by rednoah
That's an error in Line 12 in your anime.groovy script. Since you didn't provide the code, this is as far as I can help you.
Re: amc script: "CmdlineException: No media files"
Posted: 12 Apr 2017, 08:13
by ukoda
The anime.groovy file contains:
Code: Select all
// PERSONALIZED SETTINGS
def episodeDir = '''/media/multimedia/Incoming/TV''' as File
def episodeFormat = '''/media/multimedia/Misc/{n.ascii().replaceAll(/[&]/, 'and').replaceAll(/[':,!]/, '')}/Season{s}/{n.ascii().upperInitial().space('.').replaceAll(/[&]/, 'and').replaceAll(/[':,!]/, '')}.{s00e00}.{t.ascii().space('_').replaceAll(/[&]/, 'and').replaceAll(/[':,!()#]/, '')}'''
// ignore chunk, part, par and hidden files
def incomplete(f) { f.name =~ /[.]incomplete|[.]chunk|[.]par$|[.]dat$/ }
/*
* Fetch subtitles and sort into folders
*/
episodeDir.getFolders{ !it.hasFile{ incomplete(it) } && it.hasFile{ it.isVideo() } }.each{ dir ->
println "Processing $dir"
def files = dir.listFiles{ it.isVideo() }
// fetch subtitles
// files += getSubtitles(file:files)
// sort episodes / subtitles
rename(file:files, db:'TheTVDB', format:episodeFormat)
}
So I guess "episodeDir.getFolders{ !it.hasFile{ incomplete(it) } && it.hasFile{ it.isVideo() } }.each{ dir ->" is the problem with the current version. It works ok with the old version I was using (4.5).
Re: amc script: "CmdlineException: No media files"
Posted: 12 Apr 2017, 10:21
by rednoah
No idea. Might be an easy fix but I also only know what you know based on the error message, and I can't really provide code-level support and debugging here.
I'd look into simple -rename calls or the amc script. There's probably a better way to do whatever doing nowadays. Creating your own scripts generally isn't necessary for fairly simple tasks like this.
Re: amc script: "CmdlineException: No media files"
Posted: 13 Apr 2017, 00:30
by ukoda
Hi rednoah. Thanks for your help. I have got it working with reduced functionality by not testing for partial files, as it appears
Code: Select all
def incomplete(f) { f.name =~ /[.]incomplete|[.]chunk|[.]par$|[.]dat$/ }
is now not supported due to tighter type checking.
Re: amc script: "CmdlineException: No media files"
Posted: 13 Apr 2017, 00:34
by rednoah
If you take out that logic, then there's no reason to use the script at all. The rest doesn't strike me as anything other than a
-rename with some options.
@see
viewtopic.php?f=4&t=4788