clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
674 stars 176 forks source link

KeyError: (3, 9) in sabnzbd v3.5.1 #1877

Closed whvanderpost closed 2 years ago

whvanderpost commented 2 years ago

Describe the bug My sabnzbd docker container is automatically updated using watchtower. It seems last week it updated to 3.5.1 and since then the post processing scripts stopped working. Nothing else has changed in the configuration/folders. It seems the scripts are not being run at all, if I check the logs folder inside the nzbToMedia folder there a no new lines since the update of sab. Can you help with this?

Technical Specs

  1. Running on Synology DS220+
  2. Python version 2.7.18-1004 (also 3.10.1-7 installed in package center). If I run ‘python’ in ssh terminal it prints ‘3.8.8’ so don’t know for sure what version is used now.
  3. Download Client: SABnbzd
  4. Intended Media Management: SickGear

Expected behavior The post processing script to run as usual and inform sickgear of the downloaded file.

Log Traceback (most recent call last): File "/config/nzbToMedia/nzbToSickBeard.py", line 270, in import nzbToMedia File "/config/nzbToMedia/nzbToMedia.py", line 727, in eol.check() File "/config/nzbToMedia/eol.py", line 99, in check warn_for_status(version, grace_period) File "/config/nzbToMedia/eol.py", line 140, in warn_for_status days_left = lifetime(version) File "/config/nzbToMedia/eol.py", line 70, in lifetime time_left = PYTHON_EOL[(major, minor)] - now KeyError: (3, 9)

Last log from when it was still working /config/nzbToMedia/libs/custom/syno/auth.py: 100: SyntaxWarning: "is" with a literal. Did you mean "=="? if method is 'get': /config/nzbToMedia/libs/custom/syno/auth.py:109: SyntaxWarning: "is" with a literal. Did you mean "=="? elif method is 'post': [19:10:16] [INFO]::MAIN: Loading config from [/config/nzbToMedia/autoProcessMedia.cfg] [19:10:16] [INFO]::MAIN: Python v3.8 will reach end of life in 965 days. [19:10:16] [INFO]::MAIN: Checking database structure... [19:10:16] [INFO]::MAIN: Checking if git needs an update [19:10:17] [INFO]::MAIN: No update needed [19:10:17] [INFO]::MAIN: nzbToMedia Version:cdb25124ae32f72ead60082a92b348bd0e94e791 Branch:SickGear-patch-1 (Linux 4.4.180+) [19:10:17] [WARNING]::MAIN: Failed to locate ffmpeg. Transcoding disabled! [19:10:17] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ... [19:10:17] [INFO]::MAIN: ######################################################### [19:10:17] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ## [19:10:17] [INFO]::MAIN: ######################################################### [19:10:17] [INFO]::MAIN: Script triggered from SABnzbd Version 3.5.1. [19:10:18] [INFO]::MAIN: Auto-detected SECTION:SickBeard [19:10:18] [INFO]::MAIN: Calling SickBeard:sickgear to post-process:The.H265-d3g [19:10:18] [INFO]::MAIN: Attempting to auto-detect sickgear fork [19:10:18] [INFO]::MAIN: SickBeard:sickgear fork auto-detection found custom params {'process_method': None, 'is_priority': None, 'failed': None, 'type': None, 'path': None, 'force_replace': None, 'return_data': None, 'cmd': 'sg.postprocess'} [19:10:18] [INFO]::MAIN: SickBeard:sickgear fork set to custom [19:10:18] [INFO]::MAIN: FLATTEN: Flattening directory: /downloads/sickgear/The.H265-d3g [19:10:18] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request [19:10:35] [INFO]::CLEANDIR: Doing Forceful Clean of /downloads/sickgear/The.H265-d3g [19:10:35] [INFO]::MAIN: Deleting /downloads/sickgear/The.H265-d3g [19:10:35] [INFO]::MAIN: The /config/nzbToMedia/nzbToSickBeard.py script completed successfully. Changing to directory: /config/nzbToMedia

-- Cleaning bytecode -- b'Removing pycache/\n' b'Removing pycache/\n'

-- Cleaning folders: ['libs', 'core'] -- No folders to clean

Returning to directory: /app/sabnzbd

-- Cleanup finished --

SickBeard: Successfully post-processed The.DD+5.1.H265-d3g!

meeces2911 commented 2 years ago

Your eol.py is out of date - what version of nzbToMedia are you currently using ?

(To be fair - I had the same issue, which is why I saw this)

whvanderpost commented 2 years ago

Your eol.py is out of date - what version of nzbToMedia are you currently using ?

(To be fair - I had the same issue, which is why I saw this)

I'm afraid I was still on a patch branch (waiting for it to be merged to master). I could have known since in the last working log (first post) the branch was set to SickGear-patch-1, in the new log below it's reporting master and a different version guid. So I renamed the scripts folder and did a git clone again, compared the cfg file and placed it in the new folder. Now it's all running again (log below) on the master branch. Thanks for pointing out the version issue!

[09:07:22] [INFO]::MAIN: Loading config from [/config/nzbToMedia/autoProcessMedia.cfg]
[09:07:22] [INFO]::MAIN: Python v3.9 will reach end of life in 1313 days.
[09:07:22] [INFO]::MAIN: Checking database structure...
[09:07:22] [INFO]::MAIN: Database upgrade required: Initial Schema
[09:07:23] [INFO]::MAIN: Checking if git needs an update
[09:07:24] [INFO]::MAIN: No update needed
[09:07:24] [INFO]::MAIN: nzbToMedia Version:27669389216902d1085660167e7bda0bd8527ecf Branch:master (Linux 4.4.180+)
[09:07:24] [WARNING]::MAIN: Failed to locate ffmpeg. Transcoding disabled!
[09:07:24] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature  ...
[09:07:24] [INFO]::MAIN: #########################################################
[09:07:24] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ##
[09:07:24] [INFO]::MAIN: #########################################################
[09:07:24] [INFO]::MAIN: Script triggered from SABnzbd Version 3.5.1.
[09:07:24] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[09:07:24] [INFO]::MAIN: Calling SickBeard:sickgear to post-process:[snip].264-NTb
[09:07:24] [INFO]::MAIN: Attempting to auto-detect sickgear fork
[09:07:24] [INFO]::MAIN: SickBeard:sickgear fork auto-detection successful ...
[09:07:24] [INFO]::MAIN: SickBeard:sickgear fork set to SickGear-api
[09:07:24] [INFO]::MAIN: SickBeard:sickgear Could not create a fork object for SickGear-api. Probaly class not added yet.
[09:07:24] [INFO]::MAIN: FLATTEN: Flattening directory: /downloads/sickgear/[snip].264-NTb
[09:07:24] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[09:07:28] [INFO]::CLEANDIR: Directory /downloads/sickgear/[snip].264-NTb has been processed and removed ...
[09:07:28] [INFO]::MAIN: The /config/nzbToMedia/nzbToSickBeard.py script completed successfully.
Changing to directory: /config/nzbToMedia

-- Cleaning bytecode --
b'Removing __pycache__/\n'
b'Removing __pycache__/\n'

-- Cleaning folders: ['libs', 'core'] --
No folders to clean

Returning to directory:  /app/sabnzbd

-- Cleanup finished --

SickBeard: Successfully post-processed [snip].264-NTb!