Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sabnzb/Sickchill Script TV post processing failing on auto fork #1759

Closed
d9001089 opened this issue Aug 1, 2020 · 6 comments
Closed

Sabnzb/Sickchill Script TV post processing failing on auto fork #1759

d9001089 opened this issue Aug 1, 2020 · 6 comments

Comments

@d9001089
Copy link

d9001089 commented Aug 1, 2020

Describe the bug
Script fails during post processing

Technical Specs

  1. Running on Linux, NAS Model qnap 471 iintel
  2. Python version 3,7
  3. Download Client: SABnbzd
  4. Intended Media Management SickChill

Expected behavior
Script to finish without errors

Log
fatal: not a git repository (or any parent up to mount point /share)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[10:37:41] [INFO]::MAIN: Loading config from [/share/MD0_DATA/Download/nzbToMedia/autoProcessMedia.cfg]
[10:37:41] [INFO]::MAIN: Python v3.7 will reach end of life in 1061 days.
[10:37:41] [INFO]::MAIN: Checking database structure...
[10:37:41] [DEBUG]::MAIN: Checking Initial Schema database upgrade
[10:37:41] [DEBUG]::MAIN: InitialSchema upgrade not required
[10:37:41] [INFO]::MAIN: Checking if source needs an update
[10:37:42] [DEBUG]::MAIN: cur_commit = None % (newest_commit)= f5e4ec0, num_commits_behind = 0
[10:37:42] [ERROR]::MAIN: Unknown current version number, don't know if we should update or not
[10:37:42] [INFO]::MAIN: nzbToMedia Version:12.1.05 Branch:master (Linux 4.14.24-qnap)
[10:37:42] [INFO]::MAIN: #########################################################
[10:37:42] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ##
[10:37:42] [INFO]::MAIN: #########################################################
[10:37:42] [DEBUG]::MAIN: Options passed into nzbToMedia: ['/share/Download/nzbToMedia/nzbToSickBeard.py', '/share/Download/sabnzbd/completed/_SickChill/9-1-1.S03E18.1080p.WEB.X264-ALiGN', '9-1-1.S03E18.1080p.WEB.X264-ALiGN.nzb', '9-1-1.S03E18.1080p.WEB.X264-ALiGN', '', 'tv', 'alt.binaries.warez', '0', '']
[10:37:42] [INFO]::MAIN: Script triggered from SABnzbd Version 3.0.0-develop.
[10:37:42] [DEBUG]::MAIN: Adding NZB download info for directory /share/Download/sabnzbd/completed/_SickChill/9-1-1.S03E18.1080p.WEB.X264-ALiGN to database
[10:37:42] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[10:37:42] [DEBUG]::MAIN: Checking for archives to extract in directory: /share/Download/sabnzbd/completed/_SickChill/9-1-1.S03E18.1080p.WEB.X264-ALiGN
[10:37:42] [INFO]::MAIN: Calling SickBeard:tv to post-process:9-1-1.S03E18.1080p.WEB.X264-ALiGN
[10:37:42] [DEBUG]::SERVER: Attempting to connect to server at http://localhost:7073
[10:37:42] [DEBUG]::SERVER: Server responded at http://localhost:7073
[10:37:42] [INFO]::MAIN: Attempting to auto-detect tv fork
[10:37:42] [ERROR]::MAIN: Failed to get data from JSON
[10:37:42] [DEBUG]::MAIN: Response received: {'result': 'error', 'message': 'error while composing output: Object of type bytes is not JSON serializable'}
Changing to directory: /share/MD0_DATA/Download/nzbToMedia

-- Cleaning bytecode --
WARNING: Automatic cleanup could not be executed.
If errors occur, manual cleanup may be required.
REASON : Error Code: 128

Directory is not a git repository

Force cleaning folder: libs
Skipping required subfolders ['common', 'custom', 'py2', 'win']

Force cleaning folder: core
Skipping required subfolders ['auto_process', 'extractor', 'plugins', 'utils']
Returning to directory: /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd

-- Cleanup finished --

Traceback (most recent call last):
File "/share/Download/nzbToMedia/nzbToSickBeard.py", line 273, in
result = nzbToMedia.main(sys.argv, section)
File "/share/MD0_DATA/Download/nzbToMedia/nzbToMedia.py", line 968, in main
failure_link=os.environ['SAB_FAILURE_URL'])
File "/share/MD0_DATA/Download/nzbToMedia/nzbToMedia.py", line 853, in process
result = tv.process(section_name, input_directory, input_name, status, client_agent, download_id, input_category, failure_link)
File "/share/MD0_DATA/Download/nzbToMedia/core/auto_process/tv.py", line 56, in process
fork, fork_params = auto_fork(section, input_category)
File "/share/MD0_DATA/Download/nzbToMedia/core/forks.py", line 140, in auto_fork
rem_params, found = api_check(r, params, rem_params)
File "/share/MD0_DATA/Download/nzbToMedia/core/forks.py", line 26, in api_check
json_data = json_data['data']
KeyError: 'data'
Exception ignored in: <function PosixProcess.del at 0x3686810>
Traceback (most recent call last):
File "/share/MD0_DATA/Download/nzbToMedia/core/utils/processes.py", line 95, in del
AttributeError: 'NoneType' object has no attribute 'isfile'

@clinton-hall
Copy link
Owner

Have you ever had this script working, or is this a new install?

Can you check that you have the SickChill api key entered in
autoProcessMedia.cfg

[SickBeard]
    [[tv]]
        apikey =

also, make sure that api is fully enabled in SickChill.

@d9001089
Copy link
Author

d9001089 commented Aug 2, 2020

Hello, Yes I verified the api key is correct and enabled also it has been working untill I loaded the newest version of Sickchill. See below sickchill version...
Branch: py3-again
Commit: b210009
Database Version: 44.1
Python Version: 3.7.4 (default, Oct 02 2019, 11:13:20) [GCC 7.4.0]
SSL Version: OpenSSL 1.1.1g 21 Apr 2020
OS: Linux-4.14.24-qnap-x86_64-with-glibc2.2.5
Locale: en_US.UTF-8

@clinton-hall
Copy link
Owner

Interesting.

I have still been running SickChill Master branch (Still on Python 2.7)

Was this previously working with SickChill on Python3, and therefore only on last update that this stopped working, or did this stop when you updated to Python3?

I'll try and set up SickChill on python 3 at my end to test this out.

@clinton-hall
Copy link
Owner

Just out of interest, what do you get if you go to the following? Can you post then output here?

http://<qnap_ip>:7073/api/<sickChill_api>/?cmd=help&subject=postprocess

@d9001089
Copy link
Author

d9001089 commented Aug 3, 2020

Hello...
When I try to access http://<qnap_ip>:7073/api/<sickChill_api>/?cmd=help&subject=postprocess. I get an Oops: 404 page not found. As far as your other question, did it run before; I am not 100% certain since I went through several versions but I think it was working on the first v3 version I tried.

On another note: the post processing page is not working due to a typo in config_postProcessing.mako.py (line21), "sickhill" should be "sickchill". I made the change and the page started working again.... (of course you will have to disable the git pull or it will overwrite your change)

line21:
from sickhill.settings import unpackStrings

https://github.com/SickChill/SickChill/issues/6601

@miigotu
Copy link
Contributor

miigotu commented Aug 6, 2020

This is not a nzbtomedia bug, @d9001089 is on a WIP branch and encountered an error there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants