Linuxserver/sabnzbd cannot run script nzbToMedia.py

Hello,

Docker is a new concept for me and I need some help. I could not find the solution in any forum, tutorial etc. so far.

I have an ubuntu 18.04 LTS machine running sickchill and sabnzbd without any problems, but the configuration itself is a bit oversized and not ideal. So I decided to set up a completely new system based on a PI4 with OMV5 and Docker.

I was able to deploy the containers linuxserver/sabnzbd:latest and linuxserver/sickchill:latest without major problems: sickchill and sabnzbd work as expected (i.e. exactly as expected from my ubuntu 18.04 LTS machine).

The only thing I didn’t get to work is nzbToMedia: I just can’t get sabnzbd to run the postprocessing script nzbToMedia.py. After downloading a nzb, sabnzbd gives the following error message: “Exit(-1) Cannot run script /config/scripts/nzbToMedia/nzbToMedia.py”.

These are the steps I tried to so far:

  1. I set PUID and GUID according to the user pi, ie 1000 and 1000, resp
  2. as user pi, i created a sub-dir to /config called /scripts
  3. I cd’ed into the /config/scripts/ and installed via git git clone https://github.com/clinton-hall/nzbToMedia.git
  4. I changed autoProcessMedia.cfg according to the changes I made on my ubuntu 18.04 LTS
  5. I made the nzbToMedia.py script executable by sudo chmod +x nzbToMedia.py
  6. I checked that the directory is owned by pi resp that pi has all the permissions:
    pi@omv:/srv/dev-disk-by-label<LABEL>/config/sabnzbd/scripts $ ls -la
    total 24
    drwxrwxrwx+ 3 pi pi 4096 Mar 24 16:40 .
    drwxrwxrwx+ 6 pi users 4096 Mar 24 20:19 ..
    drwxrwxrwx+ 8 pi pi 4096 Mar 24 20:09 nzbToMedia
  7. In the config of sabnuzbd i set similar settings as on my ubuntu machine

I’m stuck! I don’t understand why sabnzbd does not even run the script (that’s at least my understanding of the error message). Do I have to change something in the header of nzbToMedia.py?

Currently it reads:
#!/usr/bin/env python
# coding=utf-8

If I check python in OMV with which python I get /usr/bin/python, which is the same as on my ubuntu machine.

Best, Markus

Hello Markus have you already found a solution for the problem? I have exactly the same problem and I’m not getting anywhere. Thanks

Hi marnixxala,

I couldn’t figure it out myself. My solution was to change to sonarr (instead of sickchill). Sonarr does not require any post-script. It is able to handle downloads and failed downloads via the API of sabnzbd+ (or nzbget, etc.). the ui is different but the combination of sonarr and sabnzbdplus (I also tested nzbget which also worked fine but I’m preferring sabnzbdplus) works like a charm.

I realize that migrating to another tv series handling system might imply some pain but in my case it was worth it. Plus, it is the beauty of dockers that makes it very easy and safe to test another docker without any changes to the host system.

I simply deployed linuxserver/sonarr and linuxserver/sabnzbd according to the snippet on https://hub.docker.com/r/linuxserver/sonarr/ and https://hub.docker.com/r/linuxserver/sabnzbd, respectively

Since I’m using a raspberry pi4, my user is pi. pi’s uid and gid is 1000. Please change PUID and PGID according to your system in the snippets belwo. I also added the user pi to the group docker, which might impose a security issue (not sure). If you don’t want to add your user to the group docker then simply add sudo in front of the first line of the snippets below (i.e., sudo docker create \). My system has two disks but the label of the disks shouldn’t matter. Since I’m using OMV the disks are mounted to /srv/; please change accordingly.

In my opinion, the easiest way to set this up is to ssh to the pi with putty and two execute the two snippets below (one at each time). You can copy’n’paste the snippets into putty and just press enter. If you user is not in the group docker then add sudo Please adapt the snippets according to your system:

docker create \
  --name=sonarr \
  -e PUID=1000 `#change this to the according uid`\
  -e PGID=1000 `#change this to the according gid`\
  -e TZ=Europe/Berlin \
  -e UMASK_SET=777 `#optional` \
  -p 8989:8989 \
  -v /srv/dev-disk-by-label-disk1/config/sonarr:/config \
  -v /srv/dev-disk-by-label-disk2/media/tvseries:/tv \
  -v /srv/dev-disk-by-label-disk2/downloads:/downloads \
  --restart unless-stopped \
  linuxserver/sonarr

docker create \
  --name=sabnzbd \
  -e PUID=1000 `#change this to the according uid`\
  -e PGID=1000 `#change this to the according gid`\
  -e TZ=Europe/Berlin \
  -p 8080:8080 \
  -p 9090:9090 \
  -v /srv/dev-disk-by-label-disk1/config/sabnzbd:/config \
  -v /srv/dev-disk-by-label-disk2/downloads:/downloads \
  -v /srv/dev-disk-by-label-disk1/partial_downloads:/incomplete-downloads `#optional` \
  --restart unless-stopped \
  linuxserver/sabnzbd

I believe that it is super important that the /downloads directories in both dockers point to the same directory on the host system, i.e. the -v /srv/dev-disk-by-label-disk2/downloads:/downloads \ line should be identical in both docker snippets.

In sonarr settings | download client add sabnzbd. Host is the ip address of your host system (in my case, the pi4, i.e., something like 192.168.1.xx) and NOT the IP address of the container (NOT something like 172.17.0.xxx). The remainder (api, category, etc) should be straightforward, i.e., not different to the sickchill set-up. Test the connection and click on save. Then enable Completed Download Handling and Failed Download Handling. That’s pretty much it. There were no more steps required to deal with failed downloads.

Please refer to the sonarr wiki for the other settings, but the set-up should be pretty self-explanatory.

Hope this helps.

Enjoy, Markus

P.S. on a side-note, I read somewhere that nzbget supposedly is faster than sabnzbdplus. Well, on my system it was the other way round: sabnzbdplus plus is downloading twice as fast as nzbget even though downloading from the same server and same nzbs. I also like sabnzbdplus’ ui better. In my view, that’s the beauty of employing dockers: I simply killed the nzbget docker without changing the host system. nice!

I’m not allowed to add more than two links in one post since I’m a new user. The link to sonarr is https://sonarr.tv/.

M