Closed MrCee closed 7 months ago
it looks like your python is missing logging.
you will need to install logging (within your docker?) using 'pip install logging'
The thing is, I've found the great way to have your script alongside every docker container, and although the nzbToMedia folder is simply a git clone, every docker container reaches in and uses it seamlessly without the need to adjust docker containers. Can we add logging to your script instead?
I don't build a fancy docker container with extra parameters, willing to try... but if there is a way for you to ensure logging will work with your script without changing a container that would be great.
I am used to running your scripts and they work on all containers. Previously, there was much API work you and I put into TorrentToMedia.py for Synology Download Station where you could only go by the information I found theoretically. A great result was achieved. Download Station on Synology is not a docker container... so maybe we SHOULD include 'logging' in your script?
@MrCee logging is built in to Python. If logging isn't available its likely because the system has explicitly removed it from Python or is otherwise preventing it from importing. Its more of a problem with the configuration of the system and trying to include logging within nzbToMedia could cause issues for other users that are properly configured. Could you provide more information about the docker containers that you are using?
The docker containers I used are:
linuxserver/sabnzbd linuxserver/radarr:latest
with the current config each container reaches in to the nzbToMedia folder easily. Below is an example where I specify the internal path is the same as the external path in the docker-compose.yml My nzbToMedia folder sits alongside all docker containers and reaching into this folder is very straight forward when you set the exact same path externally and internally. Everything just works. Until this logging issue. Note: Python 3.10.5 is now the default on Synology NAS.
volumes:
- /volume1/docker/nzbToMedia:/volume1/docker/nzbToMedia
Full docker-compose.yml...
version: "3.9"
services:
sabnzbd:
container_name: sabnzbd
image: linuxserver/sabnzbd
environment:
- PUID=[YOUR PUID]
- PGID=[YOUR PGID]
- TZ=[YOUR TIMEZONE]
volumes:
- /volume1/docker/sabnzbd/config:/config
- /volume1/docker/nzbToMedia:/volume1/docker/nzbToMedia
- /volume1/downloads:/volume1/downloads
- /volume1/docker/sabnzbd/config/90-config:/etc/cont-init.d/90-config
ports:
- [YOUR PORT]:[YOUR PORT]
network_mode: [YOUR BRIDGE]
restart: unless-stopped
Fixed issue by removing /opt/bin/python & /opt/bin/git and re-installing python and git using Synology Package Manager, and updating autoProcessMedia.cfg
for correct path of git.
Received this message and ran the command as requested. All works again.
fatal: detected dubious ownership in repository at '/volume1/docker/nzbToMedia'
To add an exception for this directory, call:
git config --global --add safe.directory /volume1/docker/nzbToMedia
After a DSM re-install, I faced the same issue again and came back to this post to see how I resolved it last time. Not entirely happy with my own previous workaround solution above, I thought I would look further into fixing the opkg version of python without installing from the Synology Package Centre.
All I needed to do was install pip after python...
opkg install python3
opkg install python3-pip
Describe the bug A clear and concise description of what the bug is.
Technical Specs
I haven't been able to run any scripts for a few months now
I have tried a fresh git clone and dropped the
autoProcessMedia.cfg
in the new clone.Any suggestions?
Ive tested all of them to see if they will run, they don't run. I'd still like to use
TorrentToMedia.py
with Download Station