No such property (how to test/develop)
Closed this issue · 4 comments
Hey
I have an issue with AMC.
I'm looking to make some enhancements, maybe resulting in a pull request.
TL;DR i'm getting the follow error while trying test/develop
filebot -script /config/filebot-scripts/amc.groovy --output=/tv -no-xattr --action copy --conflict auto -non-strict --log-file /config/logs/amc.log --log INFO --def ignore=/downloads/temp/ 'seriesFormat=/tv/{n}/{'\''Season '\''+s}/{n} - {sxe} - {t}' subtitles=en extras=y music=y artwork=y clean=y deleteAfterExtract=y ut_dir=/downloads/work/Trailer.Park.Boys.S12E01.1080p.WEB.x264-METCON ut_kind=multi ut_title=Trailer.Park.Boys.S12E01.1080p.WEB.x264-METCON ut_label=TV
No such property: license for class: Script1
groovy.lang.MissingPropertyException: No such property: license for class: Script1
at Script1.run(Script1.groovy:14)
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)
Platform
root@a4bb28f776f6:/# cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
filebot version
root@a4bb28f776f6:/# filebot -script fn:sysinfo
FileBot 4.9.6 (r9125)
JNA Native: 6.1.2
MediaInfo: 21.09
7-Zip-JBinding: 16.02
Tools: fpcalc/1.5.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2022-06-20 (r828)
Groovy: 3.0.9
JRE: OpenJDK Runtime Environment 17.0.2
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 20 Core / 16 GB Max Memory / 23 MB Used Memory
OS: Linux (amd64)
HW: Linux a4bb28f776f6 5.18.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.5-1 (2022-06-16) x86_64 x86_64 x86_64 GNU/Linux
CPU/MEM: Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz [MemTotal: 67 GB | MemFree: 916 MB | MemAvailable: 11 GB]
STORAGE: overlay [/] @ 836 GB | cifs [/movies] @ 15 TB | cifs [/music] @ 14 TB | cifs [/tv] @ 14 TB | ext4 [/config] @ 836 GB | ext4 [/data] @ 836 GB | cifs [/documentaries] @ 14 TB | ext4 [/downloads] @ 1.8 TB
USER: root
DATA: /data/.filebot
Package: DEB
License: FileBot License PX9869015 (Valid-Until: 2069-10-20)
Done ヾ(@⌒ー⌒@)ノ
I'm not quite sure thats the real error?
" No such property: license for class: Script1"
When testing with
filebot -script /config/filebot-scripts/amc.groovy
as opposed to
filebot -script fn:amc
are there some "PATH"s and or other things to be defined for dev and testing?
i found this:
https://www.filebot.net/forums/viewtopic.php?t=6114
But i'm on version r9125.
Where does /config/filebot-scripts/amc.groovy
come from? Line 14 does not match the error message at all. Sounds a bit like you're not actually doing what you think you're doing, i.e. amc.groovy
not being what you think it is, filebot
not being the version you think it is, etc.
Looks a bit like you're using some 3rd party docker container? I note the absence of root@a4bb28f776f6:/#
in your first paste, so I have to wonder if perhaps filebot -script /config/filebot-scripts/amc.groovy
and filebot -script fn:sysinfo
are perhaps called in different containers.
As for testing and debugging, it's really just filebot -script /path/to/script.groovy
, so could start with a test script println 'Hello World'
and then take it from there.
e3e2855 suggest that you are using some amc.groovy
revision from 2 years ago, which perhaps is not compatible with current versions of filebot
.
If you want to make your own customisations, then you'll want to start with the current code base:
https://github.com/filebot/scripts#clone
hey,
i did git clone inside the container.
git clone https://github.com/filebot/scripts.git /config/filebot-scripts
yes i'm using filebot in a container
FROM ubuntu
RUN DEBIAN_FRONTEND=noninteractive apt update -y
RUN DEBIAN_FRONTEND=noninteractive apt upgrade -y
RUN DEBIAN_FRONTEND=noninteractive apt install -y apt-utils
RUN DEBIAN_FRONTEND=noninteractive apt install -y jq \
deluge* \
default-jre \
libmediainfo0v5 \
supervisor
ADD supervisord.conf /etc/supervisor/
RUN wget -qO - https://get.filebot.net/filebot/KEYS | apt-key add -
RUN echo "deb [arch=amd64] https://get.filebot.net/deb/ stable main" >> /etc/apt/sources.list
RUN DEBIAN_FRONTEND=noninteractive apt update -y
RUN DEBIAN_FRONTEND=noninteractive apt install -y filebot
RUN useradd -u 1000 default
RUN sed 's#/home/default#/data#g' -i /etc/passwd
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
its just a basic ubuntu container with, deluge, and filebot
docker exec -it <name> bash
git clone https://github.com/filebot/scripts.git /config/filebot-scripts
filebot -script /config/filebot-scripts/amc.groovy --output=/tv -no-xattr --action copy --conflict auto -non-strict --log-file /config/logs/amc.log --log INFO --def ignore=/downloads/temp/ 'seriesFormat=/tv/{n}/{'\''Season '\''+s}/{n} - {sxe} - {t}' subtitles=en extras=y music=y artwork=y clean=y deleteAfterExtract=y ut_dir=/downloads/work/Trailer.Park.Boys.S12E01.1080p.WEB.x264-METCON ut_kind=multi ut_title=Trailer.Park.Boys.S12E01.1080p.WEB.x264-METCON ut_label=TV
i installed oracle jdk and filebot from "universal main" as opposed to "stable main"
seems to be working now
docker exec -it deluge bash
root@1f6450147d00:/# filebot -script /config/scripts/amc.groovy --output=/tv -no-xattr --action copy --conflict auto -non-strict --log-file /config/logs/amc.log --log INFO --def ignore=/downloads/temp/ 'seriesFormat=/tv/{n}/{'\''Season '\''+s}/{n} - {sxe} - {t}' subtitles=en extras=y music=y artwork=y clean=y deleteAfterExtract=y ut_dir=/downloads/work/Trailer.Park.Boys.S12E01.1080p.WEB.x264-METCON ut_kind=multi ut_title=Trailer.Park.Boys.S12E01.1080p.WEB.x264-METCON ut_label=TV
Jul 31, 2022 4:57:10 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Read archive [trailer.park.boys.s12e01.1080p.web.x264-metcon.rar] and extract to [/downloads/work/Trailer.Park.Boys.S12E01.1080p.WEB.x264-METCON/trailer.park.boys.s12e01.1080p.web.x264-metcon/Trailer.Park.Boys.S12E01.1080p.WEB.x264-METCON]
No files selected for processing