Executing command from Vuze fails but runs from command line

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
BostonScott
Donor
Posts: 6
Joined: 22 Nov 2013, 00:21

Executing command from Vuze fails but runs from command line

Post by BostonScott »

I am using Command Runner plugin in Vuze to run FileBot after a torrent downloads in order to rename the file. The command fails (see output below from Vuze Command Runner log below) If I run the command from the command line in terminal, the command executes properly. Can anyone provide some help? Below is the output from the

I am running the following:
Filebot v4.6 (3028) with the CLI installed via Brew
Java 1.8.0_66 (64 bit)
Mac OS X v10.11.2, x86_64
Vuze V5.7.0.0/4 az3

'Command Runner' log from Vuze:

Executing: filebot -script fn:amc --output "/Users/myuser/Downloads/Torrents" --action copy --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y "ut_label=Uncategorised" "ut_state=%S" "ut_title=Survivor.S31E15.HDTV.x264-FUM[ettv]" "ut_kind=multi" "ut_file=" "ut_dir=/Users/myuser/Downloads/Torrents/Survivor.S31E15.HDTV.x264-FUM[ettv]" excludeList=amc.txt
[ERROR] Unable to run "filebot -script fn:amc --output "/Users/myuser/Downloads/Torrents" --action copy --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y "ut_label=Uncategorised" "ut_state=%S" "ut_title=Survivor.S31E15.HDTV.x264-FUM[ettv]" "ut_kind=multi" "ut_file=" "ut_dir=/Users/myuser/Downloads/Torrents/Survivor.S31E15.HDTV.x264-FUM[ettv]" excludeList=amc.txt".
java.io.IOException: Cannot run program "filebot": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:450)
at java.lang.Runtime.exec(Runtime.java:347)
at com.aelitis.azureus.plugins.azexec.AzExecPlugin$7.run(AzExecPlugin.java:243)
at org.gudy.azureus2.pluginsimpl.local.utils.UtilitiesImpl.callWithPluginThreadContext(UtilitiesImpl.java:1092)
at org.gudy.azureus2.pluginsimpl.local.utils.UtilitiesImpl$4.run(UtilitiesImpl.java:483)
at org.gudy.azureus2.core3.util.AEThread2$threadWrapper.run(AEThread2.java:294)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 7 more
User avatar
rednoah
The Source
Posts: 19592
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Executing command from Vuze fails but runs from command

Post by rednoah »

1.
MAS wrote:Since Apple does not allow command-line tools in the Mac App Store you will need to install the filebot console tools via brew
@see viewtopic.php?f=4&t=2049


2.
AMC wrote:If you have PATH issues, and it almost always is PATH issues, try using the absolute path to the executable, e.g. "C:/Program Files/FileBot/filebot.exe" or /usr/local/bin/filebot
filebot is not in the PATH. Use absolute paths or link it correctly.
:idea: Please read the FAQ and How to Request Help.
BostonScott
Donor
Posts: 6
Joined: 22 Nov 2013, 00:21

Re: Executing command from Vuze fails but runs from command

Post by BostonScott »

Thanks very much for your reply.

1. In regards to installing the CLI via Brew, that is already installed. As I indicated in my first message, Filebot executes from the command line in terminal.

You can see the results below from executing this command: filebot -script fn:sysinfo

FileBot 4.6.1 (r3315)
JNA Native: 4.0.1
MediaInfo: MediaInfoLib - v0.7.78
7-Zip-JBinding: 9.20
Chromaprint: fpcalc version 1.1.0 (/opt/homebrew-cask/Caskroom/filebot/4.6.1/FileBot.app/Contents/MacOS/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.5
JRE: Java(TM) SE Runtime Environment 1.8.0_66
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 1 GB Max Memory / 68 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
Data: /Users/scott/.filebot
uname: Darwin mymacbookpro.local 15.2.0 Darwin Kernel Version 15.2.0: Fri Nov 13 19:56:56 PST 2015; root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
Done ヾ(@⌒ー⌒@)ノ



2. As for the Path not being correct, I'm not sure how to proceed here. In terminal, calling filebot works from any directory, so I had assumed that this meant that the path to filebot is linked correctly, but I may not be understanding this correctly. I would try an absolute path but I'm not sure how to construct it. That is, when I view the contents of the FileBot.app file, I'm not sure which file i should point the path to. That is to say, other examples in this forum point to a filebot.sh (e.g. /Applications/FileBot.app/Contents/MacOS/filebot.sh) but there is no filebot.sh file in that directory when I look at it. Which file should I be poingti in my absolute path? I'm hoping you can provide some further guidance.

I'll keep researching but i hope you can help. Thanks again.
BostonScott
Donor
Posts: 6
Joined: 22 Nov 2013, 00:21

Re: Executing command from Vuze fails but runs from command

Post by BostonScott »

Some follow up information:

I found the absolute path to filebot. I've changed the command in Vuze to reflect that and it now looks like this:

Code: Select all

/opt/homebrew-cask/Caskroom/filebot/4.6.1/FileBot.app/Contents/MacOS/filebot.sh -script fn:amc --output "/Users/myuser/Downloads/Torrents" --action copy --conflict skip -non-strict --log-file amc.log --def excludeList=amc.txt unsorted=y music=y artwork=y  "ut_dir=%D" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S"
Once the torrent completes, nothing seems to happen. Checking the log file in Vuze, I can see that for the command above, the variables have been updated to reflect the correct values for directory, title, etc. It also indicates that the command is being executed, but nothing happens (i.e. files are not renamed, artwork is not downloaded, amc.txt is not updated, etc) You can see the code here:

Code: Select all

/opt/homebrew-cask/Caskroom/filebot/4.6.1/FileBot.app/Contents/MacOS/filebot.sh -script fn:amc --output "/Users/myuser/Downloads/Torrents" --action copy --conflict skip -non-strict --log-file amc.log --def excludeList=amc.txt unsorted=y music=y artwork=y  "ut_dir=/Users/scott/Downloads/Torrents/The.Frankenstein.Chronicles.S01E06.HDTV.XviD-FUM[ettv]" "ut_kind=multi" "ut_title=The.Frankenstein.Chronicles.S01E06.HDTV.XviD-FUM[ettv]" "ut_label=Uncategorised" "ut_state=%S"
If I take this and enter it into the command line in terminal, it runs with the correct results.

From this I know that the path is correct, the parameters are set correctly and it is able to be processed. I'm still lost as to why Vuze does not actually execute the command even though it indicates that it is executing it.

Any help will be greatly appreciated. Thanks again.
User avatar
rednoah
The Source
Posts: 19592
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Executing command from Vuze fails but runs from command

Post by rednoah »

This path will always link to the latest version of filebot, so you should use this as absolute path:

Code: Select all

/usr/local/bin/filebot
If it still doesn't work then it can't be helped, and I recommend seeking support with the Vuze / Command Runner developers. Just use qBittorrent instead. ;)
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 19592
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Executing command from Vuze fails but runs from command

Post by rednoah »

If it works in the shell, then you can try to make Vuze call the shell and in turn have that shell call the filebot.sh script:

Code: Select all

/bin/bash --login /usr/local/bin/filebot -version
:idea: Please read the FAQ and How to Request Help.
BostonScott
Donor
Posts: 6
Joined: 22 Nov 2013, 00:21

Re: Executing command from Vuze fails but runs from command

Post by BostonScott »

I tried running the FileBot as you suggested with the path /usr/local/bin/filebot and also tried calling FileBot from the shell, but still no luck.

It's definitely a Vuze problem, unfortunately I haven't received any help from their forums, but I'll keep checking. I think that for now, I will use qBittorrent as you suggested. I actually was able to make it work with FileBot within a few minutes of installing.

If I ever find a solution to my problem, I'll post the results here.

Thanks again for all your help. Even though I wasn't able to solve the problem, I've learned quite a bit along the way. FileBot is a great program! I'm not sure what I would do without it.
Post Reply