IllegalArgumentException: --action COPY not in [MOVE, COPY, ...]

Any questions? Need some help?
Post Reply
retikulum
Posts: 3
Joined: 03 Oct 2021, 20:53

IllegalArgumentException: --action COPY not in [MOVE, COPY, ...]

Post by retikulum »

Hi there

I installed filebot-watcher via Stacks in Docker. Filestructure is /Data:/volume1 and command is /volume1/Downloads --output /volume1/Media @/volume1/Media/args.txt
(which contains --def
movieFormat=Filme/{emby}
seriesFormat=Serien/{emby}
musicFormat=Musik/{emby}
--action COPY)

In the logs I get following error message:

Code: Select all

--action COPY not in [MOVE, COPY, KEEPLINK, SYMLINK, HARDLINK, CLONE, DUPLICATE, TEST]

java.lang.IllegalArgumentException: --action COPY not in [MOVE, COPY, KEEPLINK, SYMLINK, HARDLINK, CLONE, DUPLICATE, TEST]

	at net.filebot.StandardRenameAction.forName(Unknown Source)

	at net.filebot.cli.ArgumentBean.getRenameAction(Unknown Source)

	at net.filebot.cli.ScriptShellBaseClass.getRenameAction(Unknown Source)

	at net.filebot.cli.ScriptShellBaseClass.rename(Unknown Source)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at Script1$_run_closure65.doCall(Script1.groovy:379)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at Script1.run(Script1.groovy:365)

	at net.filebot.cli.ScriptShell.evaluate(Unknown Source)

	at net.filebot.cli.ScriptShell.runScript(Unknown Source)

	at net.filebot.cli.ArgumentProcessor.runScript(Unknown Source)

	at net.filebot.cli.ArgumentProcessor.run(Unknown Source)

	at net.filebot.Main.main(Unknown Source)


Error (o_O)
Permissions are 777.

Does anyone got a solution for this?

Thx
User avatar
rednoah
The Source
Posts: 20170
Joined: 16 Nov 2011, 08:59

Re: Problem with Docker and filebot-watcher

Post by rednoah »

SPACE has special meaning on the command-line, but has no special meaning in @files, and thus SPACE is not interpreted as argument separator in your @file line. Please read @file syntax for details:
rednoah wrote: 07 Dec 2015, 07:17 Any character that is not the new line separator is interpreted as literal argument value

e.g. CORRECT pass 2 arguments:
rednoah wrote:Command-line:

Code: Select all

--action COPY
@file file:

Code: Select all

--action
COPY

e.g. INCORRECT pass 1 argument:
retikulum wrote:Command-line:

Code: Select all

"--action COPY"
@file file:

Code: Select all

--action COPY
:idea: Please read the FAQ and How to Request Help.
retikulum
Posts: 3
Joined: 03 Oct 2021, 20:53

Re: IllegalArgumentException: --action COPY not in [MOVE, COPY, ...]

Post by retikulum »

Somehow it still doesn't work as expected.
I found the logfile in a total different folder. It sits in the Docker-subfolder for some reason
/Data/Docker/FileBot2/.filebot/logs/--log-file /volume1/Media
In my Docker Compose text the volumes are defined by this

Code: Select all

    volumes:
      - /Data/Docker/FileBot2:/data
      - /Data:/volume1
      
The args.txt should point the logfile to
--log-file
/volume1/Media/amc.log
User avatar
rednoah
The Source
Posts: 20170
Joined: 16 Nov 2011, 08:59

Re: IllegalArgumentException: --action COPY not in [MOVE, COPY, ...]

Post by rednoah »

What is the filebot command-line you're trying to execute?


:idea: Don't do everything at once. Do things step by step. First, prototype your filebot command without docker. Second, integrate your confirmed-to-be-working filebot command into a docker container.


:idea: If you don't have filebot installed on your machine, then you can use docker to prototype your filebot command


e.g. start with something like this, and then change the arguments step by step, doing a test run with every step, until you got the command you want:

Code: Select all

docker run --rm -it -v $PWD:/volume1 -v data:/data rednoah/filebot -script fn:sysinfo
:idea: Please read the FAQ and How to Request Help.
retikulum
Posts: 3
Joined: 03 Oct 2021, 20:53

Re: IllegalArgumentException: --action COPY not in [MOVE, COPY, ...]

Post by retikulum »

So I figured out, that the filebot-watcher docker lacks some features. It runs with root, something like

Code: Select all

    environment:
      - PUID=1000
      - PGID=100
didn't work as expected. I tried to cut the docker compose as much as I can and abandoned the args.txt-way.

Without any arguments filebot-watcher works (very basic). It copies my files into the media folder. But it creates new folders (i.e. "Movies" and "TV Shows"). When I try to use the "--def seriesFormat=" argument it doesnt copy as expected. Do I have use it in Docker Compose with a slash after the equal sign or do I have to start with the output folder directly?
User avatar
rednoah
The Source
Posts: 20170
Joined: 16 Nov 2011, 08:59

Re: IllegalArgumentException: --action COPY not in [MOVE, COPY, ...]

Post by rednoah »

It's just amc script arguments. It's just filebot command-line usage. There's nothing specific to docker or docker compose.


:idea: If your format generates a relative path, then that relative path is resolved relatively to the output folder

Code: Select all

--output /output --format {ny}/{ny}

Code: Select all

/output/Avatar (2009)/Avatar (2009).mp4

:idea: If your format generates an absolute path, then that path is used as is:

Code: Select all

--output /output --format /media/Movies/{ny}/{ny}

Code: Select all

/media/Movies/Avatar (2009)/Avatar (2009).mp4

EDIT:

Since you're using the amc script you're going to use the --def seriesFormat and --def movieFormat script parameters instead of the filebot --format option, but conceptually it's the same.

retikulum wrote: 17 Oct 2021, 12:10 When I try to use the "--def seriesFormat=" argument it doesnt copy as expected.
If something doesn't work as expected, do read the console output. The console output will explain what is going on step by step.
:idea: Please read the FAQ and How to Request Help.
Post Reply