Getting "Environment Option" error on modified AMC script

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
tvick47
Posts: 1
Joined: 21 Oct 2014, 20:48

Getting "Environment Option" error on modified AMC script

Post by tvick47 »

Hello FileBot forums!
I've been incredibly impressed with this software over the past view months, and it has worked well for me to automate my media center and organize my media files.
However, I recently restored my Windows 8.1 computer and have been getting errors with my script that has been seemingly working for months. I have a script based on amc/watchman that listens for new files to appear in a directory, then modifies and reorganizes into another and notifies my Plex Media Server to refresh. I will attach my current script.

I generally attempt to use a windows scheduled task to start the command, but the error that I receive even when manually running it is as follows:

Code: Select all

C:\Windows\system32>"C:\Program Files\FileBot\filebot.exe" -script "C:\Program F
iles\FileBot\newwatcher.groovy" D:/filebot
MissingMethodException: No signature of method: java.io.File.watch() is applicab
le for argument types: (Script1$_run_closure1) values: [Script1$_run_closure1@5e
0e82ae]
Possible solutions: each(groovy.lang.Closure), with(groovy.lang.Closure), wait()
, wait(long), toPath(), any()
groovy.lang.MissingMethodException: No signature of method: java.io.File.watch()
 is applicable for argument types: (Script1$_run_closure1) values: [Script1$_run
_closure1@5e0e82ae]
Possible solutions: each(groovy.lang.Closure), with(groovy.lang.Closure), wait()
, wait(long), toPath(), any()
        at Script1.run(Script1.groovy:1)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
        at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:109)

        at net.filebot.Main.main(Main.java:183)
Failure (°_°)
Launch4j: Failed to run the given command.

The system could not find the environment option that was entered.
The first line is the command that is run at boot for windows, previously working.

Running the main command within the groovy file works as expected, but the actual watcher does not.
Any help with this problem would be greatly appreciated!

Oh and here's fn:sysinfo:

Code: Select all

C:\Windows\system32> filebot -script fn:sysinfo
FileBot 4.5 (r2612)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.69
7-Zip-JBinding: OK
chromaprint-tools: fpcalc version 1.1.0 (C:\Program Files\FileBot\fpcalc.exe)
Extended Attributes: OK
Groovy Engine: 2.3.7
JRE: Java(TM) SE Runtime Environment 1.8.0_25
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 16 MB Used Memory
OS: Windows 8.1 (amd64)
Thanks!
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Getting "Environment Option" error on modified AMC scrip

Post by rednoah »

The APIs for watching a folder have changed. See the GitHub code for how it works now.

I highly recommend changing your way of doing thing though. I don't think watching files is a good way to do these things.

@see http://www.filebot.net/forums/viewtopic ... p=132#p132

I don't know what this means, but it has nothing to do with the actual error:

Code: Select all

The system could not find the environment option that was entered.
:idea: Please read the FAQ and How to Request Help.
Post Reply