The --output option is required

Support for Ubuntu and other Desktop Linux distributions
Post Reply
pandiloko
Posts: 10
Joined: 09 Jan 2018, 23:00

The --output option is required

Post by pandiloko »

Hi,

after literally years of using a transmission processing command, today it failed to copy a file exiting the program with the message:

Code: Select all

Run script [fn:amc] at [Mon May 24 02:27:48 CEST 2021]
Parameter: movieFormat = /stuff/{plex}
Parameter: seriesFormat = /stuff/{plex}
Parameter: animeFormat = /stuff/{plex}
Parameter: music = n
Parameter: subtitles = en
Argument[0]: /home/watcher/media/Some.Directory.1080p
Invalid usage: The --output option is required
Abort (×_×)
Here is the executed command:

Code: Select all

/usr/bin/filebot -script fn:amc -non-strict --def 'movieFormat=/stuff/{plex}' 'seriesFormat=/stuff/{plex}' 'animeFormat=/stuff/{plex}' music=n  subtitles=en  --conflict auto --lang en --log all --action copy "/home/watcher/media/Some.Directory.1080p"
As explained this has been working for years. I tried to add the required output option and sure enough, it copied the file without problems. I thought that the folders specified in --def were already the output. With the advantage that you can have separated outputs for different contents.

Can you please clarify why this happened? Thank you very much.

Code: Select all

filebot -version
FileBot 4.9.1 (r7372) JDK8 / OpenJDK Runtime Environment 1.8.0_252 / Linux 5.4.0-73-generic (amd64)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: The --output option is required

Post by rednoah »

--output must not be undefined, and no longer defaults to --output "$PWD" and thus must be set explicitly nowadays, just like in the amc script examples:

Code: Select all

Invalid usage: The --output option is required

e.g.

Code: Select all

--output /stuff
:idea: Please read the FAQ and How to Request Help.
djblazdk
Posts: 7
Joined: 03 Feb 2019, 20:57

Re: The --output option is required

Post by djblazdk »

i got tihs kode

Code: Select all

filebot -script fn:amc --output "J:\Test" --action copy --conflict auto -non-strict --log-file amc.log --lang da --def movieFormat="J:\drev1/{f =~ /Christmas/ ? 'Julefilm' : f =~ /Jul/ ? 'Julefilm' : f =~ /3D|3d|3dhsbs|H-SBS|3dhou|H-OU|Half-SBS/ ? '3D Film' : genres.contains('Familie') ? 'Kids Movie' : genres.contains('Children') ? 'Kids Movie' : 'Movie'}/{az}/{collection.before 'test/'}/{n}.({y})/{n} {any{subt}{if (f.subtitle) '.eng-forced'}}" seriesFormat="J:/drev1/{f =~ /Christmas/ ? 'Julekalender' : f =~ /Jul/ ? 'Julekalender' : genres.contains('Familie') ? 'Kids Series' : genres.contains('Children') ? 'Kids Series' : 'Series'}/{az}/{n}.({y})/Season {s00}/{n} - {s00e00} - {t}{any{subt}{if (f.subtitle) '.eng-forced'}}" --def subtitles=en,da --def minFileSize=0 --def minLengthMS=0 "ut_label=none" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
and says

Code: Select all

Invalid usage: The --output option is required
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: The --output option is required

Post by rednoah »

The command above is most likely not actually the command that produces the log below. The log you see may have been produced by a different filebot command, one where --output is not set.


:arrow: You can change your command to the sysenv script to see the arguments you're passing along:

Code: Select all

filebot -script fn:sysenv --log-file sysenv.log
:idea: Please read the FAQ and How to Request Help.
djblazdk
Posts: 7
Joined: 03 Feb 2019, 20:57

Re: The --output option is required

Post by djblazdk »

my log file.

Code: Select all

# Environment Variables #
=::: ::\
=C:: C:\Users\Server\Desktop
=ExitCode: 00000004
ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Users\Server\AppData\Roaming
COMPUTERNAME: SERVER
ComSpec: C:\Windows\system32\cmd.exe
CommonProgramFiles: C:\Program Files\Common Files
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
CommonProgramW6432: C:\Program Files\Common Files
DokanLibrary1: C:\Program Files\Dokan\DokanLibrary-1.4.0\
DokanLibrary1_LibraryPath_x64: C:\Program Files\Dokan\DokanLibrary-1.4.0\lib\
DokanLibrary1_LibraryPath_x86: C:\Program Files\Dokan\DokanLibrary-1.4.0\x86\lib\
DriverData: C:\Windows\System32\Drivers\DriverData
FILEBOT_OPTS: -Dnet.filebot.TheMovieDB.adult=true
FPS_BROWSER_APP_PROFILE_STRING: Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING: Default
HOMEDRIVE: C:
HOMEPATH: \Users\Server
LOCALAPPDATA: C:\Users\Server\AppData\Local
LOGONSERVER: \\SERVER
NUMBER_OF_PROCESSORS: 12
OS: Windows_NT
OneDrive: C:\Users\Server\OneDrive
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE: AMD64
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 45 Stepping 7, GenuineIntel
PROCESSOR_LEVEL: 6
PROCESSOR_REVISION: 2d07
PROMPT: $P$G
PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC: C:\Users\Public
Path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\FileBot\;C:\Users\Server\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\Server\AppData\Local\Programs\Python\Python39\;C:\Users\Server\AppData\Local\Microsoft\WindowsApps;;C:\Program Files\FileBot\jre\bin
ProgramData: C:\ProgramData
ProgramFiles: C:\Program Files
ProgramFiles(x86): C:\Program Files (x86)
ProgramW6432: C:\Program Files
SESSIONNAME: Console
SystemDrive: C:
SystemRoot: C:\Windows
TEMP: C:\Users\Server\AppData\Local\Temp
TMP: C:\Users\Server\AppData\Local\Temp
USERDOMAIN: SERVER
USERDOMAIN_ROAMINGPROFILE: SERVER
USERNAME: Server
USERPROFILE: C:\Users\Server
VBOX_MSI_INSTALL_PATH: C:\Program Files\Oracle\VirtualBox\
windir: C:\Windows

# Java System Properties #
application.deployment: msi
application.dir: C:\Users\Server\AppData\Roaming\FileBot
file.encoding: Cp1252
file.separator: \
grape.root: C:\Users\Server\AppData\Roaming\FileBot\grape
groovy.antlr4: false
http.agent: FileBot/4.9.3
java.class.path: C:\Program Files\FileBot\jar\filebot.jar
java.class.version: 59.0
java.home: C:\Program Files\FileBot\jre
java.io.tmpdir: C:\Users\Server\AppData\Roaming\FileBot\tmp
java.library.path: C:\Program Files\FileBot\lib
java.net.useSystemProxies: true
java.runtime.name: OpenJDK Runtime Environment
java.runtime.version: 15.0.2+7-27
java.specification.name: Java Platform API Specification
java.specification.vendor: Oracle Corporation
java.specification.version: 15
java.vendor: Oracle Corporation
java.vendor.url: https://java.oracle.com/
java.vendor.url.bug: https://bugreport.java.com/bugreport/
java.version: 15.0.2
java.version.date: 2021-01-19
java.vm.compressedOopsMode: Zero based
java.vm.info: mixed mode
java.vm.name: OpenJDK 64-Bit Server VM
java.vm.specification.name: Java Virtual Machine Specification
java.vm.specification.vendor: Oracle Corporation
java.vm.specification.version: 15
java.vm.vendor: Oracle Corporation
java.vm.version: 15.0.2+7-27
jdk.debug: release
jdk.logger.packages: net.filebot.Log
jdk.module.path: C:\Program Files\FileBot\jre\ext\modules\lib
jna.boot.library.path: C:\Program Files\FileBot\lib
jna.library.path: C:\Program Files\FileBot\lib
jna.nosys: true
jna.nounpack: true
line.separator: 

net.filebot.AcoustID.fpcalc: C:\Program Files\FileBot\lib\fpcalc.exe
net.filebot.TheMovieDB.adult: true
net.filebot.UserFiles.fileChooser: COM
org.apache.commons.logging.Log: org.apache.commons.logging.impl.NoOpLog
os.arch: amd64
os.name: Windows 10
os.version: 10.0
path.separator: ;
prism.order: sw
sun.arch.data.model: 64
sun.boot.library.path: C:\Program Files\FileBot\jre\bin
sun.cpu.endian: little
sun.cpu.isalist: amd64
sun.io.unicode.encoding: UnicodeLittle
sun.java.command: C:\Program Files\FileBot\jar\filebot.jar -script fn:sysenv --log-file sysenv.log
sun.java.launcher: SUN_STANDARD
sun.java2d.d3d: false
sun.jnu.encoding: Cp1252
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
sun.net.client.defaultConnectTimeout: 10000
sun.net.client.defaultReadTimeout: 60000
sun.os.patch.level: 
sun.stderr.encoding: cp850
sun.stdout.encoding: cp850
swing.crossplatformlaf: javax.swing.plaf.nimbus.NimbusLookAndFeel
unixfs: false
useCreationDate: false
useExtendedFileAttributes: true
useNativeShell: false
user.country: DK
user.dir: C:\Users\Server\Desktop
user.home: C:\Users\Server
user.language: da
user.name: Server
user.script: 
user.variant: 

# Arguments #
args[0] = -script
args[1] = fn:sysenv
args[2] = --log-file
args[3] = sysenv.log
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: The --output option is required

Post by rednoah »

The idea is to call the sysenv script, instead of the amc script, with the original arguments, as to confirm that this new command is actually called, and to see the argument values passed along.

i.e. paste this command into uT and see what comes back when uT makes new filebot call based on the command template:

Code: Select all

filebot -script fn:sysenv --log-file sysenv.log --output "J:\Test" --action copy --conflict auto -non-strict --lang da --def movieFormat="J:\drev1/{f =~ /Christmas/ ? 'Julefilm' : f =~ /Jul/ ? 'Julefilm' : f =~ /3D|3d|3dhsbs|H-SBS|3dhou|H-OU|Half-SBS/ ? '3D Film' : genres.contains('Familie') ? 'Kids Movie' : genres.contains('Children') ? 'Kids Movie' : 'Movie'}/{az}/{collection.before 'test/'}/{n}.({y})/{n} {any{subt}{if (f.subtitle) '.eng-forced'}}" seriesFormat="J:/drev1/{f =~ /Christmas/ ? 'Julekalender' : f =~ /Jul/ ? 'Julekalender' : genres.contains('Familie') ? 'Kids Series' : genres.contains('Children') ? 'Kids Series' : 'Series'}/{az}/{n}.({y})/Season {s00}/{n} - {s00e00} - {t}{any{subt}{if (f.subtitle) '.eng-forced'}}" --def subtitles=en,da --def minFileSize=0 --def minLengthMS=0 "ut_label=none" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
:idea: Please read the FAQ and How to Request Help.
djblazdk
Posts: 7
Joined: 03 Feb 2019, 20:57

Re: The --output option is required

Post by djblazdk »

Code: Select all

# Arguments #
args[0] = -script
args[1] = fn:sysenv
args[2] = --log-file
args[3] = sysenv.log
args[4] = --output
args[5] = J:\Test
args[6] = --action
args[7] = copy
args[8] = --conflict
args[9] = auto
args[10] = -non-strict
args[11] = --lang
args[12] = da
args[13] = --def
args[14] = movieFormat=J:\drev1/{f =~ /Christmas/ ? 'Julefilm' : f =~ /Jul/ ? 'Julefilm' : f =~ /3D|3d|3dhsbs|H-SBS|3dhou|H-OU|Half-SBS/ ? '3D Film' : genres.contains('Familie') ? 'Kids Movie' : genres.contains('Children') ? 'Kids Movie' : 'Movie'}/{az}/{collection.before 'test/'}/{n}.({y})/{n} {any{subt}{if (f.subtitle) '.eng-forced'}}
args[15] = seriesFormat=J:/drev1/{f =~ /Christmas/ ? 'Julekalender' : f =~ /Jul/ ? 'Julekalender' : genres.contains('Familie') ? 'Kids Series' : genres.contains('Children') ? 'Kids Series' : 'Series'}/{az}/{n}.({y})/Season {s00}/{n} - {s00e00} - {t}{any{subt}{if (f.subtitle) '.eng-forced'}}
args[16] = --def
args[17] = subtitles=en,da
args[18] = --def
args[19] = minFileSize=0
args[20] = --def
args[21] = minLengthMS=0
args[22] = ut_label=none
args[23] = ut_title=De.Unge.Moedre.S31E08.DANiSH.720p.WEB.h264-HYGGE
args[24] = ut_kind=multi
args[25] = ut_dir=J:\Seed mappe\De.Unge.Moedre.S31E08.DANiSH.720p.WEB.h264-HYGGE
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: The --output option is required

Post by rednoah »

Looks good. The command above definitely works. filebot -script fn:amc will work.


Running filebot with the exact same argument array indeed yields the expected result, the --output folder option is passed in, but happens to not exist on my machine:

Code: Select all

Invalid usage: output folder must exist and must be a directory: J:\Test
:idea: Please read the FAQ and How to Request Help.
pandiloko
Posts: 10
Joined: 09 Jan 2018, 23:00

Re: The --output option is required

Post by pandiloko »

Thanks for your reply. I still want to clarify something. So you made some change in filebot concerning this output argument, didn't you? I mean, as I wrote in the OP I surely didn't change my working command in years and only recently it started to consistently fail for every item with the same problem.

Can you confirm that movieFormat, seriesFormat, etc. were used as output until recently or am I going crazy now??

In any case, thanks again for your fantastic support and for filebot

EDIT: so I RTFM in viewtopic.php?t=215 and there is indeed an example where --output is used but later it is specified that:

"You can override the default naming schemes via the --def movieFormat, seriesFormat, animeFormat and musicFormat options. Relative paths will be resolved against --output and you can use absolute paths if you want to use multiple drives."

This means I can set --output to /dev/null as long as I use absolute path in the *Format arguments. Still, --output wasn't required before, was it? I checked in my git history and I never used it until now.
Last edited by pandiloko on 26 May 2021, 11:25, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: The --output option is required

Post by rednoah »

pandiloko wrote: 26 May 2021, 10:51 Thanks for your reply. I still want to clarify something. So you made some change in filebot concerning this output argument, didn't you? I mean, as I wrote in the OP I surely didn't change my working command in years and only recently it started to consistently fail for every item with the same problem.
Yes, the script jar is updated regularly and independent of the FileBot version. You can call filebot -script fn:sysinfo for details. The --output option was required informally (i.e. it's in every single example) but this was (unfortunately) never enforced, which allowed for user errors unnecessarily, e.g. --output being undefined in combination with default format {plex} leads to files being organized relatively to their current location.

--output is used for a variety of things, including but not limited to resolving relative destination paths generated by your format. If your format consistently generates absolute file paths already though, then the --output folder has no effect on the destination path there. It's common for users to specify some options absolutely, but forget others at the default relative format, musicFormat, unsortedFormat, excludeList, storeReport, etc. Also, --output can be validated to be a valid existing folder on startup, while format expressions cannot.
:idea: Please read the FAQ and How to Request Help.
pandiloko
Posts: 10
Joined: 09 Jan 2018, 23:00

Re: The --output option is required

Post by pandiloko »

got it! Just edited my comment while you answered. Thanks!! This topic is solved!!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: The --output option is required

Post by rednoah »

No worries. If you find any examples in the forums where --output is missing, please let me know so we can fix it.


EDIT:
pandiloko wrote: 26 May 2021, 10:51 This means I can set --output to /dev/null as long as I use absolute path in the *Format arguments. Still, --output wasn't required before, was it? I checked in my git history and I never used it until now.
You definitely cannot set --output /dev/null (if you can, then it's a bug) but you could do --output "$PWD". However, I would recommend against that unless you are keenly aware of what value $PWD is going to be every time you call filebot. The idea behind forcing you to specify --output is forcing you to know what --output is, as opposed to --output implicitly defaulting to something without you being aware.
:idea: Please read the FAQ and How to Request Help.
giulian
Posts: 6
Joined: 26 May 2021, 18:38

Re: The --output option is required

Post by giulian »

hi can you help to modify my script i have same suddently error message all was good during many month

my script :

Code: Select all

docker exec filebot /opt/filebot/filebot -script fn:amc --action symlink -non-strict "/storage/torrents/" --conflict auto -non-strict --log-file amc.log --def movieFormat="/storage/Media/Movies/{fn}-{y}" --def seriesFormat="/storage/Media/TV Shows/{n}/Season {s}/{s00e00} - {t}" --def animeFormat="/storage/Media/Anime/{n}/Season {s}/{s00e00} - {t}" --def unsorted=n minFileSize=0 minLengthMS=0 music=n artwork=n --def clean=y --def excludeList=/config/amc-exclude-list.txt --def deleteAfterExtract=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
output log :

Code: Select all

Run script [fn:amc] at [Wed May 26 18:35:01 GMT 2021]
Parameter: movieFormat = /storage/Media/Movies/{fn}-{y}
Parameter: seriesFormat = /storage/Media/TV Shows/{n}/Season {s}/{s00e00} - {t}
Parameter: animeFormat = /storage/Media/Anime/{n}/Season {s}/{s00e00} - {t}
Parameter: unsorted = n
Parameter: minFileSize = 0
Parameter: minLengthMS = 0
Parameter: music = n
Parameter: artwork = n
Parameter: clean = y
Parameter: excludeList = /config/amc-exclude-list.txt
Parameter: deleteAfterExtract = y
Parameter: ut_dir = %F
Parameter: ut_kind = multi
Parameter: ut_title = %N
Parameter: ut_label = %L
Argument[0]: /storage/torrents
Bad ut_dir value: %F
Bad ut_title value: %N
Bad ut_label value: %L
Invalid usage: output folder must exist and must be a directory: /stuff
Abort (×_×)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: The --output option is required

Post by rednoah »

giulian wrote: 26 May 2021, 18:43

Code: Select all

Invalid usage: output folder must exist and must be a directory: /stuff
Abort (×_×)
There is no /stuff folder in your docker container.

Based on your absolute formats, I guess /storage/Media is your output folder:

Code: Select all

--output /storage/Media

:!: Note that the filebot command you posted (i.e. --output unset) is not actually the filebot command (i.e. --output set to /stuff) that produces the log you posted.
:idea: Please read the FAQ and How to Request Help.
Gaz
Posts: 1
Joined: 27 May 2021, 13:21

Re: The --output option is required

Post by Gaz »

Hey,

I am also using the AMC Script and started to get the --output required error. I have added --output C: but then I get an Invalid usage: no input error. Here is my code:

Code: Select all

cmd /c START /MIN cmd /c filebot -script fn:amc --action move -non-strict --conflict skip --def seriesFormat="\\SYN/TV Shows/{n}/{episode.special ? 'Season 00' : 'Season '+S}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[`´‘’ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}" --def movieFormat="\\SYN/Movies/{n}/{n} 4K HDR{' CD'+pi}{'.'+lang}" --def unsorted=y --def clean=y --def excludeList=C:/utorrent/amc.txt --log-file C:/utorrent/amclog.log --def artwork=n --def kodi=10.0.0.4:xxxx--output C: "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" ut_state_allow=11
Please can you help.

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

Re: The --output option is required

Post by rednoah »

NO:

Code: Select all

... --def kodi=10.0.0.4:xxxx--output C: "ut_label=%L" ...
:!: Because the space character matters. Please read Cmdline and Argument Passing for details.

:!: Because you're also breaking the --def name=value name=value ... parameter sequence.

:!: Because C: is typically write-protected, so it's not a valid --output folder.


YES:

Code: Select all

... --def kodi=10.0.0.4:xxxx --output "C:/utorrent" --def "ut_label=%L" ...
:idea: You can replace C:/utorrent with any existing writable folder or drive that is not the write-protected system drive.

:!: FileBot does not currently check if --output is writable or not, but may do so in the future if this is a common user error.
:idea: Please read the FAQ and How to Request Help.
giulian
Posts: 6
Joined: 26 May 2021, 18:38

Re: The --output option is required

Post by giulian »

Thanks so much it s ok now
Post Reply