Page 1 of 1

Illegal usage: output folder must be a valid folder

Posted: 31 Oct 2016, 03:34
by junior0332
Hello,

Starting today, filebot fails with error message -

Code: Select all

Illegal usage: output folder must be a valid folder: $/server
I'm using your transmission-postprocess script.

There were no problems yesterday (10/29/16) and nothing has changed on my end. Was there a recent update to the github source that effects the output folder? The last commit was two days ago but this was working then. Here is the full error -

Code: Select all

Run script [fn:amc] at [Sun Oct 30 23:22:57 EDT 2016]
Parameter: ut_dir = /server/downloads/Batman- Strange Days - 75th Anniversary Short.mp4
Parameter: ut_kind = multi
Parameter: ut_title = Batman- Strange Days - 75th Anniversary Short.mp4
Parameter: ut_label = N/A
Parameter: seriesFormat = /server/tv shows/{n}/Season {s.pad(2)}/{n} - {sxe} - {t}
Parameter: animeFormat = /Anime/{n}/{fn}
Parameter: movieFormat = /server/movies/{n} ({y})/{n} ({y})
Parameter: musicFormat = /server/music/lp's/{n}/{n} - {album} ({y})/{pi.pad(2)+'. '}{artist} - {t}
Parameter: music = y
Parameter: skipExtract = y
Parameter: artwork = n
Parameter: clean = n
Parameter: reportError = y
Parameter: gmail = *****
Parameter: storeReport = n
     [mail] Sending email: [FileBot] Failure
     [mail] Sent email with 0 attachments
Illegal usage: output folder must be a valid folder: $/server
Failure (°_°)

Re: amc failure

Posted: 31 Oct 2016, 08:50
by rednoah
$/server is not a valid folder. Do you actually have a folder literally called "$" relative to your working directory or did you just screw up when typing the $server variable? :lol:

The --output folder must exist and must be a valid folder.

Re: Illegal usage: output folder must be a valid folder

Posted: 31 Oct 2016, 11:36
by junior0332
This is weird, because it's been working for a while now. I haven't ssh'd into my server for months. /server is a symlink to /media/array1. Here was a successful rename on Friday. I understand what you're saying about $. I'm just trying to figure out if I need to seek professional mental help.

Code: Select all

Run script [fn:amc] at [Fri Oct 28 16:15:28 EDT 2016]
Parameter: ut_dir = /server/downloads/The.Big.Bang.Theory.S10E06.720p.HDTV.X264-DIMENSION.mkv
Parameter: ut_kind = multi
Parameter: ut_title = The.Big.Bang.Theory.S10E06.720p.HDTV.X264-DIMENSION.mkv
Parameter: ut_label = N/A
Parameter: seriesFormat = /server/tv shows/{n}/Season {s.pad(2)}/{n} - {sxe} - {t}
Parameter: animeFormat = /Anime/{n}/{fn}
Parameter: movieFormat = /server/movies/{n} ({y})/{n} ({y})
Parameter: musicFormat = /server/music/lp's/{n}/{n} - {album} ({y})/{pi.pad(2)+'. '}{artist} - {t}
Parameter: music = y
Parameter: skipExtract = y
Parameter: artwork = n
Parameter: clean = n
Parameter: reportError = y
Parameter: gmail = *****
Parameter: storeReport = n
Input: /media/array1/downloads/The.Big.Bang.Theory.S10E06.720p.HDTV.X264-DIMENSION.mkv
Group: [tvs:the big bang theory] => [The.Big.Bang.Theory.S10E06.720p.HDTV.X264-DIMENSION.mkv]
Oct 28, 2016 4:15:30 PM java.util.prefs.FileSystemPreferences$1 run
WARNING: Couldn't create user preferences directory. User preferences are unusable.
Oct 28, 2016 4:15:30 PM java.util.prefs.FileSystemPreferences$1 run
WARNING: java.io.IOException: No such file or directory
Rename episodes using [TheTVDB]
Auto-detected query: [The Big Bang Theory]
Fetching episode data for [The Big Bang Theory]
[KEEPLINK] Rename [/media/array1/downloads/The.Big.Bang.Theory.S10E06.720p.HDTV.X264-DIMENSION.mkv] to [/server/tv shows/The Big Bang Theory/Season 10/The Big Bang Theory - 10x06 - The Fetal Kick Catalyst.mkv]
Processed 1 files
     [mail] Sending email: [FileBot] The.Big.Bang.Theory.S10E06.720p.HDTV.X264-DIMENSION.mkv     [mail] Sent email with 0 attachments
Done ヾ(@⌒ー⌒@)ノ

Re: Illegal usage: output folder must be a valid folder

Posted: 31 Oct 2016, 13:26
by rednoah
The script is updated continuously. You've been using it wrong all along, but fortunately it now checks for whatever it is you're doing wrong.

This is what the script will look like: https://github.com/filebot/plugins/blob ... process.sh

Based on the output above you're probably doing something like this, which really really shouldn't work, and if it does then that's a bug, which has been fixed now:

Code: Select all

CONFIG_OUTPUT="$/server"
When you made your modifications you broke it, except older versions accidentally kinda worked mostly maybe.

Re: Illegal usage: output folder must be a valid folder

Posted: 31 Oct 2016, 15:01
by junior0332
It figures I'd be doing it wrong this whole time. When I get home I'll drop the $ and try again.

While I have you on here, I've read previously in these forums that Filebot should not have write access to our production directories. In my case, that's /server/tv shows or /server/movies. But how do I have Filebot (or in this case my debian-transmission user) rename and index my files without having write access to these directories?

To give you an idea about my workflow, I download everything to /server/downloads. From there I rename and move to the production directories that Plex watches. A symlink gets left behind in the downloads directory using the awesome keeplink feature, then gets moved to /server/seeding using a Transmission CLI command.

Re: Illegal usage: output folder must be a valid folder

Posted: 31 Oct 2016, 15:10
by rednoah
junior0332 wrote:While I have you on here, I've read previously in these forums that Filebot should not have write access to our production directories. In my case, that's /server/tv shows or /server/movies. But how do I have Filebot (or in this case my debian-transmission user) rename and index my files without having write access to these directories?
FileBot will most definitely need read/write access for the output folder and each destination path, otherwise FileBot wouldn't have permission to write copies or links. :lol:

Re: Illegal usage: output folder must be a valid folder

Posted: 31 Oct 2016, 15:51
by junior0332
It figures that I can't find the forum post where I thought you said Filebot shouldn't have write access to production. I think it was over a revert issue another user had. Not that I think you would, but what's to stop you from adding a

Code: Select all

rm -rf *
to the github script overnight? I don't mean to sound rude or anything. But what if you just have a bad week/month/year and you decide to just nuke our production directories?

Re: Illegal usage: output folder must be a valid folder

Posted: 31 Oct 2016, 16:45
by rednoah
Nothing, shit happens.

If you use dev:name it means you're pretty much trusting whatever is on GitHub at the time on you're only protected by HTTPS. The fn:name script bundle is much more trustworthy in that only I can bundle and codesign new releases (and your FileBot will only update it's scripts once a week so some people will get updates sooner than others and can complain about issues).

You always can clone your own scripts, but to run them you'd still have to trust filebot with whatever permissions you decide to give it. ;)

Re: Illegal usage: output folder must be a valid folder

Posted: 01 Nov 2016, 02:09
by junior0332
Understood. The only problem I ran into by running the script locally, is a missing signature for the gmail feature

Code: Select all

No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.sendGmail() is applicable for argument types: (java.util.LinkedHashMap) values: [[subject:[FileBot] Westworld.S01E05.720p.HDTV.x264-AVS.mkv, ...]]
Is there anything I can do?

Re: Illegal usage: output folder must be a valid folder

Posted: 01 Nov 2016, 08:04
by rednoah
The mere fact that you're not using git clone already tells me that you don't plan on ever updating your scripts? Suffice to say, not using the latest software is most strongly discouraged.

If you can't figure it out yourself (or follow the instructions) then you're not ready to maintain your own script repository. ;)

@see https://github.com/filebot/scripts#clone

Re: Illegal usage: output folder must be a valid folder

Posted: 01 Nov 2016, 10:49
by junior0332
I git cloned of course. But I moved amc.groovy out of the scripts folder. Does it depend on another script in the folder?

Re: Illegal usage: output folder must be a valid folder

Posted: 01 Nov 2016, 11:10
by rednoah
junior0332 wrote:But I moved amc.groovy out of the scripts folder.
Why would you do that? That defeats the purpose of using git in the first place. The whole point is that you get all the scripts which may or may not depend on each other as well as updates via git pull (which you should do at least occasionally).

Re: Illegal usage: output folder must be a valid folder

Posted: 01 Nov 2016, 12:38
by junior0332
My logic was, if and when tvdb or moviedb changes their API and you subsequently change your script to accommodate it, I would update your scripts as needed. I guess just having a ever-changing script pulled from the internet that has unfettered write access to my entertainment directories puts the fear of God in me. Not that you've given us any reason to think you would do something nefarious. I do have nightly backups, but it's just a heartache I'd rather not have if something went completely tits up.

I know that if I have that type of anxiety using Filebot, I shouldn't be using it. But I think you've created something fantastic here, and I almost can't live without it if I stick with the same workflow I've been using. I just want the piece of mind at night that there's nothing introduced to the script that unintentionally or intentionally borks my entire system.

Re: Illegal usage: output folder must be a valid folder

Posted: 01 Nov 2016, 13:28
by rednoah
Sure, but how does this ⇩ make any difference? :lol:
junior0332 wrote:But I moved amc.groovy out of the scripts folder.
git clone => take a snapshot of the current repository (git does not automatically update your repository)
git pull => update your repository to the latest revision (for when you feel like updating)