Script Error After Updating to 4.2 (from 4.0)

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Akki
Posts: 16
Joined: 27 Jun 2013, 21:16

Script Error After Updating to 4.2 (from 4.0)

Post by Akki »

I realize I'm a little late to the party. For some reason I haven't checked for updates in a while, and after updating my scripts are no longer working. The error I get is:

Code: Select all

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script2.groovy: 2: unable to resolve class net.sourceforge.filebot.WebServices
 @ line 2, column 1.
   import static net.sourceforge.filebot.WebServices.*
   ^

Script2.groovy: 2: unable to resolve class net.sourceforge.filebot.WebServices
 @ line 2, column 1.
   import static net.sourceforge.filebot.WebServices.*
   ^

2 errors

MissingMethodException: No signature of method: java.io.File.eachMediaFolder() is applicable for argument types: (Script1$_run_closure3) values: [Script1$_run_closure3@b6cddb]
groovy.lang.MissingMethodException: No signature of method: java.io.File.eachMediaFolder() is applicable for argument types: (Script1$_run_closure3) values: [Script1$_run_closure3@b6cddb]
	at Script1.run(Script1.groovy:19)
	at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:60)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:81)
	at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:108)
	at net.filebot.Main.main(Main.java:191)
Failure (°_°)
Launch4j: Failed to run the given command.
I wrote the scripts pretty much from scratch, so it's not just a case of needing to update to a newer version of those, I don't think. Just need some help figuring out what I need to change to get the scripts to work again.

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

Re: Script Error After Updating to 4.2 (from 4.0)

Post by rednoah »

Sorry, v4.2 pretty has lots of internal changes, so scripts relying on internal code will break.

First of all all filebot classes are now in net.filebot.* and not net.sourceforge.filebot.* but there is plenty of other internal changes as well. You can check the scripts on GitHub and see how things are done now.
:idea: Please read the FAQ and How to Request Help.
Akki
Posts: 16
Joined: 27 Jun 2013, 21:16

Re: Script Error After Updating to 4.2 (from 4.0)

Post by Akki »

I actually realized that I hadn't updated htpc.groovy. But now I'm getting

Code: Select all

MissingMethodException: No signature of method: java.io.File.eachMediaFolder() is applicable for argument types: (Script1$_run_closure3) values: [Script1$_run_closure3@6f4a47c7]
groovy.lang.MissingMethodException: No signature of method: java.io.File.eachMediaFolder() is applicable for argument types: (Script1$_run_closure3) values: [Script1$_run_closure3@6f4a47c7]
	at Script1.run(Script1.groovy:20)
	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:193)
Failure (°_°)
Launch4j: Failed to run the given command.
I see that eachMediaFolder is still used in some of the scripts in the GitHub repo, so I'm wondering if it just no longer takes File as an argument?
Akki
Posts: 16
Joined: 27 Jun 2013, 21:16

Re: Script Error After Updating to 4.2 (from 4.0)

Post by Akki »

OK, looks like I've gotten things working after some trial and error. Thanks.
Post Reply