mdhiggins / sma-mod

MIT License
7 stars 2 forks source link

SABnzbd 3.5.1 - Script exit code is 2 #6

Closed morganzero closed 2 years ago

morganzero commented 2 years ago

Describe the bug I update sab to 3.5.1 this morning and all encodes give "Script exit code is 2" The full error output is:

Exit(2) /usr/local/sma/venv/bin/python3: can't open file '/usr/local/sma/SABPostProcess.py': [Errno 2] No such file or directory 

Command or context you are trying to run SABPostProcess.sh

autoProcess.ini settings Please sensor API keys/private information but include all other settings

[Converter]
ffmpeg = /usr/local/bin/ffmpeg
ffprobe = /usr/local/bin/ffprobe
threads = 0
hwaccels =
hwaccel-decoders = h264_cuvid, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid, hevc_qsv, h264_qsv, hevc_vaapi, h264_vaapi
hwdevices = vaapi:/dev/dri/renderD128
hwaccel-output-format = vaapi:vaapi
output-directory =
output-format = mkv
output-extension = mkv
temp-extension =
minimum-size = 0
ignored-extensions = nfo, ds_store, txt
copy-to =
move-to =
delete-original = True
sort-streams = True
process-same-extensions = True
bypass-if-copying-all = True
force-convert = False
post-process = False
wait-post-process = False
detailed-progress = False
opts-separator = ,
preopts =
postopts =

[Permissions]
chmod = 0777
uid = 1000
gid = 1000

[Metadata]
relocate-moov = False
full-path-guess = True
tag = False
tag-language = eng
download-artwork = False
sanitize-disposition =
strip-metadata = True

[Video]
codec = h264, x264
max-bitrate = 0
bitrate-ratio =
crf = -1
crf-profiles =
preset =
codec-parameters =
dynamic-parameters = False
max-width = 0
profile =
max-level = 0.0
pix-fmt =
filter =
force-filter = False

[HDR]
codec =
pix-fmt =
space = bt2020nc
transfer = smpte2084
primaries = bt2020
preset =
codec-parameters =
filter =
force-filter = False
profile =

[Audio]
codec = aac
languages =
default-language =
first-stream-of-language = False
allow-language-relax = True
channel-bitrate = 0
max-bitrate = 0
max-channels = 0
prefer-more-channels = True
default-more-channels = True
filter =
force-filter = False
sample-rates =
copy-original = True
aac-adtstoasc = False
ignore-truehd = mp4, m4v
ignored-dispositions =
unique-dispositions = False

[Universal Audio]
codec = aac
channel-bitrate = 0
first-stream-only = False
move-after = False
filter =
force-filter = False

[Audio.ChannelFilters]
6-2 = pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE

[Subtitle]
codec = srt, ass
codec-image-based = pgs
languages =
default-language =
first-stream-of-language = False
encoding =
burn-subtitles = False
burn-dispositions =
embed-subs = True
embed-image-subs = True
embed-only-internal-subs = False
filename-dispositions = forced
ignore-embedded-subs = False
ignored-dispositions =
unique-dispositions = False
attachment-codec =

[Subtitle.Subliminal]
download-subs = False
download-hearing-impaired-subs = False
providers =

[Subtitle.Subliminal.Auth]
opensubtitles =
tvsubtitles =

Log files Include log files for the specific job (not just a dump of all your logs for the past month) that's causing the issue. Please turn on debug level logging Log files are found in your script root config folder ./sma/config/sma.log The last log was created just before I updated. Seems like SAB 3.5.1 is not excepting the SMA MOD.

System Information

morganzero commented 2 years ago

After some more digging it seems like sma mod fails the update.py or something, that results in the files not being downloaded to the sab container, hence why it can't find it. Here is the docker log output:

[mod-init] Curl/JQ was not found on this system for Docker mods installing

Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]

Get:2 http://ppa.launchpad.net/jcfp/nobetas/ubuntu focal InRelease [17.5 kB]

Get:3 http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal InRelease [17.5 kB]

Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]

Get:5 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]

Get:6 http://ppa.launchpad.net/jcfp/nobetas/ubuntu focal/main Sources [1,594 B]

Get:7 http://ppa.launchpad.net/jcfp/nobetas/ubuntu focal/main amd64 Packages [1,167 B]

Get:8 http://archive.ubuntu.com/ubuntu focal/multiverse Sources [208 kB]

Get:9 http://archive.ubuntu.com/ubuntu focal/universe Sources [12.3 MB]

Get:10 http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal/main Sources [1,584 B]

Get:11 http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal/main amd64 Packages [1,477 B]

Get:12 http://archive.ubuntu.com/ubuntu focal/main Sources [1,079 kB]

Get:13 http://archive.ubuntu.com/ubuntu focal/restricted Sources [7,198 B]

Get:14 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]

Get:15 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]

Get:16 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1,275 kB]

Get:17 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]

Get:18 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Sources [21.8 kB]

Get:19 http://archive.ubuntu.com/ubuntu focal-updates/restricted Sources [39.3 kB]

Get:20 http://archive.ubuntu.com/ubuntu focal-updates/main Sources [579 kB]

Get:21 http://archive.ubuntu.com/ubuntu focal-updates/universe Sources [281 kB]

Get:22 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,006 kB]

Get:23 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [29.4 kB]

Get:24 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,134 kB]

Get:25 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [1,052 kB]

Get:26 http://archive.ubuntu.com/ubuntu focal-security/universe Sources [103 kB]

Get:27 http://archive.ubuntu.com/ubuntu focal-security/main Sources [250 kB]

Get:28 http://archive.ubuntu.com/ubuntu focal-security/restricted Sources [39.2 kB]

Get:29 http://archive.ubuntu.com/ubuntu focal-security/multiverse Sources [8,655 B]

Get:30 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,558 kB]

Get:31 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages [841 kB]

Get:32 http://archive.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [974 kB]

Get:33 http://archive.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [25.8 kB]

Fetched 35.9 MB in 2s (18.5 MB/s)

Reading package lists...

Reading package lists...

Building dependency tree...

Reading state information...

curl is already the newest version (7.68.0-1ubuntu2.7).

The following additional packages will be installed:

  libjq1 libonig5

The following NEW packages will be installed:

  jq libjq1 libonig5

0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.

Need to get 313 kB of archives.

After this operation, 1,062 kB of additional disk space will be used.

Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 libonig5 amd64 6.9.4-1 [142 kB]

Get:2 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libjq1 amd64 1.6-1ubuntu0.20.04.1 [121 kB]

Get:3 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 jq amd64 1.6-1ubuntu0.20.04.1 [50.2 kB]

debconf: unable to initialize frontend: Dialog

debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 3.)

debconf: falling back to frontend: Readline

debconf: unable to initialize frontend: Readline

debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7, <> line 3.)

debconf: falling back to frontend: Teletype

dpkg-preconfigure: unable to re-open stdin: 

Fetched 313 kB in 0s (2,284 kB/s)

Selecting previously unselected package libonig5:amd64.

(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 8905 files and directories currently installed.)

Preparing to unpack .../libonig5_6.9.4-1_amd64.deb ...

Unpacking libonig5:amd64 (6.9.4-1) ...

Selecting previously unselected package libjq1:amd64.

Preparing to unpack .../libjq1_1.6-1ubuntu0.20.04.1_amd64.deb ...

Unpacking libjq1:amd64 (1.6-1ubuntu0.20.04.1) ...

Selecting previously unselected package jq.

Preparing to unpack .../jq_1.6-1ubuntu0.20.04.1_amd64.deb ...

Unpacking jq (1.6-1ubuntu0.20.04.1) ...

Setting up libonig5:amd64 (6.9.4-1) ...

Setting up libjq1:amd64 (1.6-1ubuntu0.20.04.1) ...

Setting up jq (1.6-1ubuntu0.20.04.1) ...

Processing triggers for libc-bin (2.31-0ubuntu9.2) ...

[mod-init] Attempting to run Docker Modification Logic

[mod-init] Applying mdhiggins/sma-mod:latest files to container

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] 01-envfile: executing... 

[cont-init.d] 01-envfile: exited 0.

[cont-init.d] 01-migrations: executing... 

[migrations] started

[migrations] no migrations found

[cont-init.d] 01-migrations: exited 0.

[cont-init.d] 02-tamper-check: executing... 

[cont-init.d] 02-tamper-check: exited 0.

[cont-init.d] 10-adduser: executing... 

-------------------------------------

          _         ()

         | |  ___   _    __

         | | / __| | |  /  \

         | | \__ \ | | | () |

         |_| |___/ |_|  \__/

Brought to you by linuxserver.io

-------------------------------------

To support the app dev(s) visit:

SABnzbd: https://sabnzbd.org/donate

To support LSIO projects visit:

https://www.linuxserver.io/donate/

-------------------------------------

GID/UID

-------------------------------------

User uid:    1000

User gid:    1000

-------------------------------------

[cont-init.d] 10-adduser: exited 0.

[cont-init.d] 20-config: executing... 

[cont-init.d] 20-config: exited 0.

[cont-init.d] 50-gid-video: executing... 

[cont-init.d] 50-gid-video: exited 0.

[cont-init.d] 90-custom-folders: executing... 

[cont-init.d] 90-custom-folders: exited 0.

[cont-init.d] 90-sma-config: executing... 

[90-sma-config] Init SMA from github master

error: The following untracked working tree files would be overwritten by merge:

    config/__init__.py

Please move or remove them before you merge.

Aborting

[90-sma-config] Creating python virtual environment and installing requirements

Hope this helps!

morganzero commented 2 years ago

I managed to solve it myself. I needed to bind the autoProcess.ini file instead of /config and SABPostProcess.py reappeared.

mdhiggins commented 2 years ago

I'm going to look into this, you should be able to mount the whole folder but this was introduced in a new update trying to consolidate the alpine / ubuntu versions of sma-mod into a single universal container

mdhiggins commented 2 years ago

@morganzero Alright I changed my approach via the Dockerfile, should be able to mount the whole config folder again if you could try the latest version

This should work universally with either Alpine or Ubuntu based images