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

NZBDRONE: No scan id was returned due to: the JSON object must be str, not 'bytes' #1696

Closed
PeterPan669 opened this issue Jan 7, 2020 · 7 comments

Comments

@PeterPan669
Copy link

Describe the bug
Failed to post-process - Returned log from NzbDrone was not as expected.! However, it processes correctly.

Technical Specs

  1. Running on Synology (no docker)
  2. Python version 3.5
  3. Download Client SABnbzd
  4. Intended Media Management Sonarr

Expected behavior
The serie does post-process correctly, but I'm getting this error saying it didn't due to not expected response. According to the log: No scan id was returned due to: the JSON object must be str, not 'bytes'

Log
[03:54:59] [INFO]::MAIN: Loading config from [/volume1/downloads/SCRIPTS/nzbToMedia/autoProcessMedia.cfg]
/volume1/downloads/SCRIPTS/nzbToMedia/eol.py:147: LifetimeWarning: Python 3.5 is no longer supported.
warnings.warn(msg, LifetimeWarning)
[03:55:00] [INFO]::MAIN: Python v3.5 will reach end of life in 250 days.
[03:55:00] [WARNING]::MAIN: Please upgrade to a more recent Python version.
[03:55:00] [INFO]::MAIN: Checking database structure...
[03:55:00] [INFO]::MAIN: Checking if git needs an update
[03:55:03] [INFO]::MAIN: No update needed
[03:55:04] [INFO]::MAIN: nzbToMedia Version:a320ac5a66428e86702267983b0b03af718228a3 Branch:master (Linux 3.10.105)
[03:55:04] [INFO]::MAIN: #########################################################
[03:55:04] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ##
[03:55:04] [INFO]::MAIN: #########################################################
[03:55:04] [INFO]::MAIN: Script triggered from SABnzbd 0.7.17+
[03:55:05] [INFO]::MAIN: Auto-detected SECTION:NzbDrone
[03:55:05] [INFO]::MAIN: Calling NzbDrone:tv to post-process:<<edit by PeterPan; episode removed>>
[03:55:06] [INFO]::MAIN: Attempting to verify tv fork
[03:55:09] [INFO]::MAIN: NzbDrone:tv fork set to default
[03:55:09] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/downloads/complete/series/<<edit by PeterPan; episode removed>>
[03:55:09] [POSTPROCESS]::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request
[03:55:09] [WARNING]::NZBDRONE: No scan id was returned due to: the JSON object must be str, not 'bytes'
[03:55:09] [ERROR]::MAIN: A problem was reported in the /volume1/downloads/SCRIPTS/nzbToMedia/nzbToNzbDrone.py script.
Changing to directory: /volume1/downloads/SCRIPTS/nzbToMedia

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

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

Returning to directory: /volume1/@appstore/sabnzbd/share/SABnzbd

-- Cleanup finished --

NzbDrone: Failed to post-process - Returned log from NzbDrone was not as expected.!

@clinton-hall
Copy link
Owner

Are you able to switch to the Sonarr-patch-1 branch and test? I believe this fix should resolve the issue.

@PeterPan669
Copy link
Author

PeterPan669 commented Jan 7, 2020

Hi Clinton, thanks for your swift reply!
I shall test it, if you forgive me one n00b question: How do I pull / git this branch via SSH? Kinda new to the linux / unix side of things 😉
EDIT: I replaced the content of tv.py with the content of tv.py on the branch. Not sure if this is the correct way to do things, but it works :) error is gone. Thanks!

@clinton-hall
Copy link
Owner

to switch branches via ssh (this example is to switch to Sonarr-patch-1 branch which is now gone...

cd /volume1/downloads/SCRIPTS/nzbToMedia
git pull
git checkout Sonarr-patch-1

By replacing the contents, you have verified the fix, however this will break automatic updating.

I suggest you run the following to fix (and get on to nightly branch which now has the patch)

cd /volume1/downloads/SCRIPTS/nzbToMedia
git reset --hard
git checkout nightly
git pull

when I have merged this into master branch, you would run the following to get back on to master... I'm probably going to merge this all up soon (within the week hopefully)

cd /volume1/downloads/SCRIPTS/nzbToMedia
git checkout master
git pull

@PeterPan669
Copy link
Author

/volume1/downloads/SCRIPTS/nzbToMedia$ git reset --hard
Updating files: 100% (1853/1853), done.
HEAD is now at a320ac5 Merge branch 'dev'
/volume1/downloads/SCRIPTS/nzbToMedia$ git checkout nightly
error: pathspec 'nightly' did not match any file(s) known to git

Am I doing something wrong?

Thanks for commenting btw, starting to make sense of this linux world :)

@PeterPan669
Copy link
Author

/volume1/downloads/SCRIPTS/nzbToMedia$ git branch -a
warning: ignoring broken ref refs/remotes/origin/Sonarr-patch-1
warning: ignoring broken ref refs/remotes/origin/nightly <- ? broken?

  • master
    remotes/origin/HEAD -> origin/master
    remotes/origin/SABnzbd-empty-1
    remotes/origin/SynoDS-patch-1
    remotes/origin/dev
    remotes/origin/master
    remotes/origin/subs-patch-1

@clinton-hall
Copy link
Owner

you had me worried for a bit... but nightly is still here... looks to be something at your end
try

cd /volume1/downloads/SCRIPTS/nzbToMedia
git pull
git branch -d nightly
git checkout nightly
git pull

@PeterPan669
Copy link
Author

Fixed it by removing the dir altogether and doing a new clone, followed by switching to the nightly. Thanks, works now :)

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

2 participants