Hi Clinton, I'm using SickRage and everything was running perfectly for 6+ months, all of a sudden every show in sabnzb is failing with this error - SickBeard: Failed to post-process - Returned log from SickBeard was not as expected.!
Here is a copy of the log.
[code] [22:51:09] [INFO]::MAIN: Loading config from [/share/MD0_DATA/Download/nzbToMedia/autoProcessMedia.cfg]
[22:51:09] [INFO]::MAIN: Checking database structure...
[22:51:09] [INFO]::MAIN: Checking if git needs an update
[22:51:12] [INFO]::MAIN: No update needed
[22:51:12] [INFO]::MAIN: nzbToMedia Version:9b143cd6f2eb2edc14f32149ed9e4532c3ecd7c6 Branch:master (Linux 3.4.6)
[22:51:12] [WARNING]::MAIN: Failed to locate ffprobe. Video corruption detection disabled!
[22:51:12] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ...
[22:51:12] [INFO]::MAIN: #########################################################
[22:51:12] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ##
[22:51:12] [INFO]::MAIN: #########################################################
[22:51:12] [INFO]::MAIN: Script triggered from SABnzbd
[22:51:13] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[22:51:13] [INFO]::MAIN: Calling SickBeard:tv to post-process:The.Flash.2014.S01E07.Power.Outage.720p.WEB-DL.DD5.1.H.264-NTb.REPOST.nzb
[22:51:14] [INFO]::MAIN: Attempting to auto-detect tv fork
[22:51:14] [INFO]::MAIN: SickBeard:tv fork auto-detection found custom params {}
[22:51:14] [INFO]::MAIN: SickBeard:tv fork set to custom
[22:51:14] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/The.Flash.2014.S01E07.Power.Outage.720p.WEB-DL.DD5.1.H.264-NTb.REPOST
[22:51:14] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/The.Flash.2014.S01E07.Power.Outage.720p.WEB-DL.DD5.1.H.264-NTb.REPOST
[22:51:14] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[22:51:14] [POSTPROCESS]::SICKBEARD: <!DOCTYPE html>
[22:51:14] [POSTPROCESS]::SICKBEARD:
[22:51:14] [POSTPROCESS]::SICKBEARD:
[22:51:14] [ERROR]::MAIN: A problem was reported in the /share/Download/nzbToMedia/nzbToSickBeard.py script.
SickBeard: Failed to post-process - Returned log from SickBeard was not as expected.!
[/code]
I believe your SickRage just updated and now has a different log in page?
if so, then this is fixed in my dev branch.
please switch to my dev branch... and try again.
Something must have changed at SickRage...
I don't have any downloads for a few more days. At that time I should be able to reproduce. In the meantime I'll check the commits to see what has changed...
For me it's not too hard to reproduce. I simply try to recommit a download that was already downloaded using the same command line uTorrent uses. I just copy the details from any still running torrent in uTorrent (it still needs to be available off course) :). I don't mind trying to fix the code where it parses the login but my python is really bad. Where in the code (which python script) is the definition of the login page?
try:
if section == "SickBeard":
logger.debug("Opening URL: %s with params: %s" % (url, str(fork_params)), section)
r = None
r = requests.get(url, auth=(username, password), params=fork_params, stream=True, verify=False)
In the log I see:
[00:14:04] [DEBUG]::SICKBEARD: Opening URL: http://localhost:XXXX/home/postprocess/processEpisode with params: {'nzbName': ......
Then the exception is requested:
except requests.ConnectionError:
logger.error("Unable to open URL: %s" % (url), section)
return [1, "%s: Failed to post-process - Unable to connect to %s" % (section, section) ]
But, in my case no exception is happening. Also tried it with "except requests.exceptions.RequestException as e:" but no other exceptions are happening either.
Does the logon page not use Basic Authentication anymore, and should it be rewritten to a post? I am not sure how the loginpage looked before, but I vaguely remember a Windows Authentication screen?
I am afraid that's a bit too difficult for me to code not being a trained python programmer :)
Python is cool. Still trying to get a hang of it. Well, I now added this bit:
url = None
if section == "SickBeard":
url = "%s%s:%s%s/login" % (protocol,host,port,web_root)
try:
payload = {
'username': username,
'password': password
}
logger.debug("Opening URL: %s" % url, section)
logger.debug("Payload is: %s" % str(payload), section)
r = None
r = requests.post(url, data=payload, stream=True, verify=False)
except requests.ConnectionError:
logger.error("Unable to open URL: %s" % (url), section)
return [1, "%s: Failed to post-process - Unable to connect to %s" % (section, section) ]
if not r.status_code in [requests.codes.ok, requests.codes.created, requests.codes.accepted]:
logger.error("Server returned status %s" % (str(r.status_code)), section)
return [1, "%s: Failed to post-process - Server returned status %s" % (section, str(r.status_code)) ]
logger.debug("URL: %s" % (r.url), section)
logger.debug("Status Code: %s" % (r.status_code), section)
logger.debug("Raise for status: %s" % (r.raise_for_status()), section)
logger.debug("Text result: %s" % (r.text), section)
And from the text result I can see logon was successfull! So next step would be to do the get, but for some reason it still fails... will try a bit, but in case I fall asleep (it's 1:49 here), someone else can continue where I left off :)
Yeaaahhhh, figured it out. Just don't know how to pull the source, so will leave that to Clinton. Here's the solution:
In autoProcessTV.py there's the following bit of code:
url = None
if section == "SickBeard":
url = "%s%s:%s%s/home/postprocess/processEpisode" % (protocol,host,port,web_root)
elif section == "NzbDrone":
url = "%s%s:%s%s/api/command" % (protocol, host, port, web_root)
url2 = "%s%s:%s%s/api/config/downloadClient" % (protocol, host, port, web_root)
headers = {"X-Api-Key": apikey}
params = {'sortKey': 'series.title', 'page': 1, 'pageSize': 1, 'sortDir': 'asc'}
if remote_path:
logger.debug("remote_path: %s" % (remoteDir(dirName)),section)
data = {"name": "DownloadedEpisodesScan", "path": remoteDir(dirName), "downloadClientId": download_id}
else:
logger.debug("path: %s" % (dirName),section)
data = {"name": "DownloadedEpisodesScan", "path": dirName, "downloadClientId": download_id}
if not download_id:
data.pop("downloadClientId")
data = json.dumps(data)
try:
if section == "SickBeard":
logger.debug("Opening URL: %s with params: %s" % (url, str(fork_params)), section)
r = None
r = requests.get(url, auth=(username, password), params=fork_params, stream=True, verify=False)
elif section == "NzbDrone":
logger.debug("Opening URL: %s with data: %s" % (url, str(data)), section)
r = None
r = requests.post(url, data=data, headers=headers, stream=True, verify=False)
except requests.ConnectionError:
logger.error("Unable to open URL: %s" % (url), section)
return [1, "%s: Failed to post-process - Unable to connect to %s" % (section, section) ]
Change it into the following, which will first call the login screen, parse it (post) and then call the postprocessing screen (get) within the same session (in the previous bit I simply needed to put it together with the get and make sure it's with the session):
url = None
if section == "SickBeard":
url = "%s%s:%s%s/login" % (protocol,host,port,web_root)
elif section == "NzbDrone":
url = "%s%s:%s%s/api/command" % (protocol, host, port, web_root)
url2 = "%s%s:%s%s/api/config/downloadClient" % (protocol, host, port, web_root)
headers = {"X-Api-Key": apikey}
params = {'sortKey': 'series.title', 'page': 1, 'pageSize': 1, 'sortDir': 'asc'}
if remote_path:
logger.debug("remote_path: %s" % (remoteDir(dirName)),section)
data = {"name": "DownloadedEpisodesScan", "path": remoteDir(dirName), "downloadClientId": download_id}
else:
logger.debug("path: %s" % (dirName),section)
data = {"name": "DownloadedEpisodesScan", "path": dirName, "downloadClientId": download_id}
if not download_id:
data.pop("downloadClientId")
data = json.dumps(data)
try:
if section == "SickBeard":
with requests.Session() as s:
payload = {
'username': username,
'password': password
}
logger.debug("Opening URL: %s" % url, section)
r = None
r = s.post(url, data=payload, stream=True, verify=False)
url = "%s%s:%s%s/home/postprocess/processEpisode" % (protocol,host,port,web_root)
logger.debug("Opening URL: %s with params: %s" % (url, str(fork_params)), section)
r = s.get(url, auth=(username, password), params=fork_params, stream=True, verify=False)
elif section == "NzbDrone":
logger.debug("Opening URL: %s with data: %s" % (url, str(data)), section)
r = None
r = requests.post(url, data=data, headers=headers, stream=True, verify=False)
except requests.ConnectionError:
logger.error("Unable to open URL: %s" % (url), section)
return [1, "%s: Failed to post-process - Unable to connect to %s" % (section, section) ]
Again, I am no Python programmer so I may have missed some error catching, etc., but it works for me :)
Well.. not such a legend. While seeing how to checkout the code and change it on github I already noticed similar items in the code! It turns out that I was playing with the code from the master branch (whereas I thought I was on dev!). So... I switched to dev again (see instructions above, or simply download the zip and replace your files from https://github.com/clinton-hall/nzbToMedia/tree/dev) and it turns out it works fine!
So... what's the errors you guys are getting when you're in the dev branch? Did you make sure you're on the latest Sickrage release?
But my SickRage is master - BRANCH: (master) / COMMIT: (1be07e56725437cb495b19b082401a755e9dcbb8)
I don't know how to change that. As i type this I just updated my SickRage to the newest version so don't know if that did anything. I had updated it 2 days ago to the latest so unless major changes were made in the last 2 days between updates I'd say the error still persists.
I will download some random small show now and see what happens....take a few mins.
In my case it's master for SickRage and dev for nzbtomedia, but I also tested on develop for SickRage and it works for me on there too. Can you post another log showing it fails on the releases you're on now? Possibly, just to be sure, also post the autoProcessTV.py file which contains the logon code.
I just downloaded the dev version of nzbtomedia from here, unrar'd it, and replaced all of my files in /share/MD0_DATA/Download/nzbToMedia and downloaded a show...worked perfectly! Not sure why, but whatever ha!
Well, at least I have learned some more Python with this excersize ;)
So we have a different kind of issue here. It started with the fact the login screen changed which had already been solved in the dev branch, but ends now where it seems we were on dev but actually were on master. Check your logs for the following:
From my logs I can see I was on master all the time, although I had switched to dev. I guess I must have used a wrong git command when switching to dev:
@clinton-hall, instead of relying to the user to use the right git commands it might be better to use an option in autoProcessMedia.cfg? And additionally it would possibly be a good idea to snatch the Sickrage branch and add it to debug logging when the loginpage is parsed?
@nikagl
The auto updater originally included an opton to specift branch, but this caused some big problems, so I disabled it... I'll try to debug and implement soon...
Is it a bug in nzbtomedia, or has there something changed in Sickrage? Always worked before, seems that the processEpisode method handles it a bit different and not understaning it anymore..
Getting also the following error:
AAAttributeError: 'WebRoot' object has no attribute 'home/postprocess/processEpisode'
AA method = getattr(self, route)
AA File "C:\SickBeard-TVRage\sickbeard\webserve.py", line 214, in get
2014-12-23 18:08:19 INFO ::MAIN: SickBeard:tv fork set to sickrage
2014-12-23 18:08:19 POSTPROCESS::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
2014-12-23 18:08:19 DEBUG ::SICKBEARD: Opening URL: http://localhost:8081/sickbeard//home/postprocess/processEpisode with params: {'nzbName': 'xxxx', 'quiet': 1, 'failed': 0, 'process_method': '1', 'dir': 'xxx'}
2014-12-23 18:08:19 POSTPROCESS::SICKBEARD: <!DOCTYPE html>
2014-12-23 18:08:19 POSTPROCESS::SICKBEARD:
2014-12-23 18:08:19 POSTPROCESS::SICKBEARD:
Do you have fork = SickRage? If so, can you try fork = auto and shoe the full logs from a process?
I can't reproduce this issue. It did come from a change to SickRage, but this has been fixed in nzbToMedia and works with current SickRage everytime I test.
Can you confirm what version of nzbToMedia you have (I know you said latest, but can you check the Hash?)
Current hash nzbtomedia (nightly): ab24081e30171539d0b65283b62d87d0d6294a12
Current hash SickRage (master): SiCKRAGETV/SickRage@33e95870e0c1b241c93f541d4ee27ed6ba3bfcb8
I've send you an log file with fork to 'auto' using the mail address in your Github profile
@nikagl
Now I am really confused. The commit you are on (9b143cd) is from before I made the requests.sessions change. This version shouldn't work with current SIckRage unless you still have your own modifications (which would likely kill the auto-updater)
The other issue, as reported here was that web_root = /sickbeard/ was used, when changed to web_root = /sickbeard everything worked again. Looks like with the changes at SickRage this // always reverted to home page!
So, be sure not to add a final "/" to the end of any web_root
Sorry to dig this up Clinton but I'm still having an issue. I download and copy to dev files into the correct directory and everything works sweet again. Fast forward a few days and them I'm getting the same issue over again and not sure why. Is it being wiped over and updated automatically or something? If so how can i stop it. Cheers.
Ugh, i can't get it to work at all now. Why did sickrage have to fuck it up for me, it was working for so long perfectly :package :P A different error now. I'm using master sickrage and dev nzbtomedia.
[10:59:06] [INFO]::MAIN: Loading config from [/share/MD0_DATA/Download/nzbToMedia/autoProcessMedia.cfg]
[10:59:06] [INFO]::MAIN: Checking database structure...
[10:59:06] [INFO]::MAIN: Checking if git needs an update
[10:59:07] [INFO]::MAIN: No update needed
[10:59:07] [INFO]::MAIN: nzbToMedia Version:9b143cd6f2eb2edc14f32149ed9e4532c3ecd7c6 Branch:dev (Linux 3.4.6)
[10:59:07] [WARNING]::MAIN: Failed to locate ffprobe. Video corruption detection disabled!
[10:59:07] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ...
[10:59:07] [INFO]::MAIN: #########################################################
[10:59:07] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ##
[10:59:07] [INFO]::MAIN: #########################################################
[10:59:07] [INFO]::MAIN: Script triggered from SABnzbd
[10:59:08] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[10:59:08] [INFO]::MAIN: Calling SickBeard:tv to post-process:Steven.Universe.S01E34.HDTV.x264-W4F.nzb
[10:59:10] [INFO]::MAIN: Attempting to auto-detect tv fork
[10:59:11] [INFO]::MAIN: SickBeard:tv fork auto-detection found custom params {'force': None, 'dir': None, 'process_method': None}
[10:59:11] [INFO]::MAIN: SickBeard:tv fork set to custom
[10:59:12] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/Steven.Universe.S01E34.HDTV.x264-W4F
[10:59:12] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/Steven.Universe.S01E34.HDTV.x264-W4F
[10:59:12] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[10:59:46] [ERROR]::SICKBEARD: Server returned status 500
[10:59:46] [ERROR]::MAIN: A problem was reported in the /share/Download/nzbToMedia/nzbToSickBeard.py script.
SickBeard: Failed to post-process - Server returned status 500!
I got that status 500 error because i removed the username and password from the sickrage setting to login to the program. I put it back in and I'm now getting my original error again.
[11:09:42] [INFO]::MAIN: Loading config from [/share/MD0_DATA/Download/nzbToMedia/autoProcessMedia.cfg]
[11:09:42] [INFO]::MAIN: Checking database structure...
[11:09:42] [INFO]::MAIN: Checking if git needs an update
[11:09:43] [INFO]::MAIN: No update needed
[11:09:43] [INFO]::MAIN: nzbToMedia Version:9b143cd6f2eb2edc14f32149ed9e4532c3ecd7c6 Branch:dev (Linux 3.4.6)
[11:09:43] [WARNING]::MAIN: Failed to locate ffprobe. Video corruption detection disabled!
[11:09:43] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ...
[11:09:43] [INFO]::MAIN: #########################################################
[11:09:43] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ##
[11:09:43] [INFO]::MAIN: #########################################################
[11:09:43] [INFO]::MAIN: Script triggered from SABnzbd
[11:09:44] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[11:09:44] [INFO]::MAIN: Calling SickBeard:tv to post-process:Steven.Universe.S01E33.HDTV.x264-W4F.nzb
[11:09:44] [INFO]::MAIN: Attempting to auto-detect tv fork
[11:09:44] [INFO]::MAIN: SickBeard:tv fork auto-detection found custom params {}
[11:09:44] [INFO]::MAIN: SickBeard:tv fork set to custom
[11:09:45] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/Steven.Universe.S01E33.HDTV.x264-W4F
[11:09:45] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/Steven.Universe.S01E33.HDTV.x264-W4F
[11:09:45] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[11:09:45] [POSTPROCESS]::SICKBEARD: <!DOCTYPE html>
[11:09:45] [POSTPROCESS]::SICKBEARD:
[11:09:45] [POSTPROCESS]::SICKBEARD:
[11:09:45] [ERROR]::MAIN: A problem was reported in the /share/Download/nzbToMedia/nzbToSickBeard.py script.
SickBeard: Failed to post-process - Returned log from SickBeard was not as expected.!
Hi Clinton, I'm using SickRage and everything was running perfectly for 6+ months, all of a sudden every show in sabnzb is failing with this error - SickBeard: Failed to post-process - Returned log from SickBeard was not as expected.!
Here is a copy of the log.
[code] [22:51:09] [INFO]::MAIN: Loading config from [/share/MD0_DATA/Download/nzbToMedia/autoProcessMedia.cfg] [22:51:09] [INFO]::MAIN: Checking database structure... [22:51:09] [INFO]::MAIN: Checking if git needs an update [22:51:12] [INFO]::MAIN: No update needed [22:51:12] [INFO]::MAIN: nzbToMedia Version:9b143cd6f2eb2edc14f32149ed9e4532c3ecd7c6 Branch:master (Linux 3.4.6) [22:51:12] [WARNING]::MAIN: Failed to locate ffprobe. Video corruption detection disabled! [22:51:12] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ... [22:51:12] [INFO]::MAIN: ######################################################### [22:51:12] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ## [22:51:12] [INFO]::MAIN: ######################################################### [22:51:12] [INFO]::MAIN: Script triggered from SABnzbd [22:51:13] [INFO]::MAIN: Auto-detected SECTION:SickBeard [22:51:13] [INFO]::MAIN: Calling SickBeard:tv to post-process:The.Flash.2014.S01E07.Power.Outage.720p.WEB-DL.DD5.1.H.264-NTb.REPOST.nzb [22:51:14] [INFO]::MAIN: Attempting to auto-detect tv fork [22:51:14] [INFO]::MAIN: SickBeard:tv fork auto-detection found custom params {} [22:51:14] [INFO]::MAIN: SickBeard:tv fork set to custom [22:51:14] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/The.Flash.2014.S01E07.Power.Outage.720p.WEB-DL.DD5.1.H.264-NTb.REPOST [22:51:14] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/The.Flash.2014.S01E07.Power.Outage.720p.WEB-DL.DD5.1.H.264-NTb.REPOST [22:51:14] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request [22:51:14] [POSTPROCESS]::SICKBEARD: <!DOCTYPE html> [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD:
[22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD:[22:51:14] [POSTPROCESS]::SICKBEARD:
[22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD:
[22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD: [22:51:14] [POSTPROCESS]::SICKBEARD:
[22:51:14] [POSTPROCESS]::SICKBEARD:[22:51:14] [POSTPROCESS]::SICKBEARD:
Any Idea how to fix it?
Cheers.
I believe your SickRage just updated and now has a different log in page? if so, then this is fixed in my dev branch. please switch to my dev branch... and try again.
Ok cool. I'm pretty retarded, any instructions on how I do that? Cheers.
from shell:
git branch (tells you on witch branch you are, normally the output should be master)
git branch dev (adds a dev branch) git checkout dev (checkout & switch to dev branch)
you can check afterwarts with:
git branch *dev master
but NZBTOSTICKBEARD is still failing for me... :/
Regards
You underestimated my retardation :P I don't know how to implement your instructions. I'm sorry lol...
I actually did it! - http://i.gyazo.com/d807531abcb6d97f3f97da1c7ecb3016.png
I will restart my NAS and then try an episode again....Will report back!
Should my version be showing "Dev"? I did change it as seen in my last post but under config in SR its showing this after restarting my NAS.. .
SR Version: BRANCH: (master) / COMMIT: (514e9d848fda265ca3c012bc3e41f45918ed4f96)
God this is frustrating. I tried running an episode and it failed with the same errors again.
SickRage version is master... but nzbToMedia version should be dev What do the latest nzbtomedia.log entries show?
I'm on the dev branch of nzbToMedia and the master of sickrage and I'm still getting the not as expected errors. (I'm on Ubuntu)
Linux download 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Have you tried develop branch of SickRage?
I'll post the log tomorrow man, just finished last day of work for the year and I'm getting fucking hammered!
I am running on the dev branch too and I'm having the same issue on Win2k3.
Something must have changed at SickRage... I don't have any downloads for a few more days. At that time I should be able to reproduce. In the meantime I'll check the commits to see what has changed...
For me it's not too hard to reproduce. I simply try to recommit a download that was already downloaded using the same command line uTorrent uses. I just copy the details from any still running torrent in uTorrent (it still needs to be available off course) :). I don't mind trying to fix the code where it parses the login but my python is really bad. Where in the code (which python script) is the definition of the login page?
nzbToMeda/nzbtomedia/autoProcessTV.py and also in nzbToMedia/nzbtomedia/autoFork.py
Ok, found the code and started some debugging.
First let's analyse the actual request:
In the log I see:
Then the exception is requested:
But, in my case no exception is happening. Also tried it with "except requests.exceptions.RequestException as e:" but no other exceptions are happening either.
Added some extra debugging:
The status code is "200" and raise for status is "None", all is ok, right?
With the URL used by requests I am wondering whether that's right:
In the end I just don't know how that requests module authentication is supposed to work. When it iterates the lines that are returned:
It simply returnd the logon page:
Does the logon page not use Basic Authentication anymore, and should it be rewritten to a post? I am not sure how the loginpage looked before, but I vaguely remember a Windows Authentication screen?
I am afraid that's a bit too difficult for me to code not being a trained python programmer :)
Good to see I'm not the only one! Yeah the login page used to be a windows based login thing, now its in sickrage itself.
Python is cool. Still trying to get a hang of it. Well, I now added this bit:
And from the text result I can see logon was successfull! So next step would be to do the get, but for some reason it still fails... will try a bit, but in case I fall asleep (it's 1:49 here), someone else can continue where I left off :)
Yeaaahhhh, figured it out. Just don't know how to pull the source, so will leave that to Clinton. Here's the solution:
In autoProcessTV.py there's the following bit of code:
Change it into the following, which will first call the login screen, parse it (post) and then call the postprocessing screen (get) within the same session (in the previous bit I simply needed to put it together with the get and make sure it's with the session):
Again, I am no Python programmer so I may have missed some error catching, etc., but it works for me :)
Regards,
Nika.
What a legend Nika! I've got no idea what I'm doing so I'll wait for Clinton to implement the fix before I fuck it up lol.
Well.. not such a legend. While seeing how to checkout the code and change it on github I already noticed similar items in the code! It turns out that I was playing with the code from the master branch (whereas I thought I was on dev!). So... I switched to dev again (see instructions above, or simply download the zip and replace your files from https://github.com/clinton-hall/nzbToMedia/tree/dev) and it turns out it works fine!
So... what's the errors you guys are getting when you're in the dev branch? Did you make sure you're on the latest Sickrage release?
I'm retarded, do you mean dev branch of SickRage or dev branch of nzbtomedia? I believe my nzbtomedia is on dev (I just checked with putty) - http://i.gyazo.com/e101185089172eb620912b90ea0fe9be.png
But my SickRage is master - BRANCH: (master) / COMMIT: (1be07e56725437cb495b19b082401a755e9dcbb8)
I don't know how to change that. As i type this I just updated my SickRage to the newest version so don't know if that did anything. I had updated it 2 days ago to the latest so unless major changes were made in the last 2 days between updates I'd say the error still persists.
I will download some random small show now and see what happens....take a few mins.
In my case it's master for SickRage and dev for nzbtomedia, but I also tested on develop for SickRage and it works for me on there too. Can you post another log showing it fails on the releases you're on now? Possibly, just to be sure, also post the autoProcessTV.py file which contains the logon code.
Going to bed now, it's 3:05 here! Bye!
Fair enough, have a good sleep mate!
Bare in mind, i have made no modifications to any files yet (such as the ones you suggested). Just tested a show and still errors with the same thing.
https://gist.github.com/bartley69/7264f67e00179f2fe700#file-gistfile1-txt
I just downloaded the dev version of nzbtomedia from here, unrar'd it, and replaced all of my files in /share/MD0_DATA/Download/nzbToMedia and downloaded a show...worked perfectly! Not sure why, but whatever ha!
for me the problem was:
if you have auto update turned on, before each post-processing it downloads & updates the latest master (overwrites dev version).
after switching auto update off (in nzbToSickbeard) everything works flawless with dev branch.
thx regards
auto update should update the "current" branch. if you have checked out dev with git, the auto update should update the dev branch...
Well, at least I have learned some more Python with this excersize ;)
So we have a different kind of issue here. It started with the fact the login screen changed which had already been solved in the dev branch, but ends now where it seems we were on dev but actually were on master. Check your logs for the following:
You can even see when the error occured what branch you were on in SickRage, because it was part of the loginpage:
From my logs I can see I was on master all the time, although I had switched to dev. I guess I must have used a wrong git command when switching to dev:
@clinton-hall, instead of relying to the user to use the right git commands it might be better to use an option in autoProcessMedia.cfg? And additionally it would possibly be a good idea to snatch the Sickrage branch and add it to debug logging when the loginpage is parsed?
Regards,
Nika.
@nikagl The auto updater originally included an opton to specift branch, but this caused some big problems, so I disabled it... I'll try to debug and implement soon...
I'm still having issues post-processing from nzbget 14.1 to sickrage dev. Has this issue been resolved?
Here is the log
http://pastebin.com/SjRxb7iP
What version of nzbToMedia are you on? Please try updating again... this problem should have been resolved.
Having here the same issue with latest version of nzbtomedia
When calling the following URL SickRage redirects to the homepage and won't process the file:
http://localhost:8081/sickbeard//home/postprocess/processEpisode with params: {'nzbName': 'example', 'quiet': 1, 'failed': 0, 'process_method': '1', 'dir': 'example'}
Is it a bug in nzbtomedia, or has there something changed in Sickrage? Always worked before, seems that the processEpisode method handles it a bit different and not understaning it anymore..
Branch: master Hash: 33e95870e0c1b241c93f541d4ee27ed6ba3bfcb8
Getting also the following error: AAAttributeError: 'WebRoot' object has no attribute 'home/postprocess/processEpisode' AA method = getattr(self, route) AA File "C:\SickBeard-TVRage\sickbeard\webserve.py", line 214, in get
2014-12-23 18:08:19 INFO ::MAIN: SickBeard:tv fork set to sickrage 2014-12-23 18:08:19 POSTPROCESS::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request 2014-12-23 18:08:19 DEBUG ::SICKBEARD: Opening URL: http://localhost:8081/sickbeard//home/postprocess/processEpisode with params: {'nzbName': 'xxxx', 'quiet': 1, 'failed': 0, 'process_method': '1', 'dir': 'xxx'} 2014-12-23 18:08:19 POSTPROCESS::SICKBEARD: <!DOCTYPE html> 2014-12-23 18:08:19 POSTPROCESS::SICKBEARD: 2014-12-23 18:08:19 POSTPROCESS::SICKBEARD:
Do you have fork = SickRage? If so, can you try fork = auto and shoe the full logs from a process?
I can't reproduce this issue. It did come from a change to SickRage, but this has been fixed in nzbToMedia and works with current SickRage everytime I test.
Can you confirm what version of nzbToMedia you have (I know you said latest, but can you check the Hash?)
Current hash nzbtomedia (nightly): ab24081e30171539d0b65283b62d87d0d6294a12 Current hash SickRage (master): SiCKRAGETV/SickRage@33e95870e0c1b241c93f541d4ee27ed6ba3bfcb8
I've send you an log file with fork to 'auto' using the mail address in your Github profile
I use:
All on Python 2.7 on Win2k3.
And it works fine for me...
Regards,
Nika.
@nikagl Now I am really confused. The commit you are on (9b143cd) is from before I made the requests.sessions change. This version shouldn't work with current SIckRage unless you still have your own modifications (which would likely kill the auto-updater)
Now I am confused too. I fully reinitialised the local repository, switched to dev, and this is what I now see in the logs:
And post processing works fine:
And this is from my SickRage logs:
Also, autoProcessTV.py contains "s = requests.Session()" which is part of your requests.sessions change...
Not sure why the commit in sickrage is wrong? weird! I have used the following commands to fully reinitialise my local repository:
Nevertheless, I'll test again by fully reinitialising again... more news after testing again.
Regards,
Nika.
Well... reinitialised it without switching to dev branch. It's fine now:
And it still works fine with SickRage too:
Regards,
Nika.
Looks like the problem was that I manually done git checkout dev in the nzbtomedia repo. Switching back to master seems to have solved the problem...
The other issue, as reported here was that web_root = /sickbeard/ was used, when changed to web_root = /sickbeard everything worked again. Looks like with the changes at SickRage this // always reverted to home page! So, be sure not to add a final "/" to the end of any web_root
Sorry to dig this up Clinton but I'm still having an issue. I download and copy to dev files into the correct directory and everything works sweet again. Fast forward a few days and them I'm getting the same issue over again and not sure why. Is it being wiped over and updated automatically or something? If so how can i stop it. Cheers.
can you check to see what version of the script you have now? Is it somehow reverting? can you post the full log again?
Ugh, i can't get it to work at all now. Why did sickrage have to fuck it up for me, it was working for so long perfectly :package :P A different error now. I'm using master sickrage and dev nzbtomedia.
[10:59:06] [INFO]::MAIN: Loading config from [/share/MD0_DATA/Download/nzbToMedia/autoProcessMedia.cfg] [10:59:06] [INFO]::MAIN: Checking database structure... [10:59:06] [INFO]::MAIN: Checking if git needs an update [10:59:07] [INFO]::MAIN: No update needed [10:59:07] [INFO]::MAIN: nzbToMedia Version:9b143cd6f2eb2edc14f32149ed9e4532c3ecd7c6 Branch:dev (Linux 3.4.6) [10:59:07] [WARNING]::MAIN: Failed to locate ffprobe. Video corruption detection disabled! [10:59:07] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ... [10:59:07] [INFO]::MAIN: ######################################################### [10:59:07] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ## [10:59:07] [INFO]::MAIN: ######################################################### [10:59:07] [INFO]::MAIN: Script triggered from SABnzbd [10:59:08] [INFO]::MAIN: Auto-detected SECTION:SickBeard [10:59:08] [INFO]::MAIN: Calling SickBeard:tv to post-process:Steven.Universe.S01E34.HDTV.x264-W4F.nzb [10:59:10] [INFO]::MAIN: Attempting to auto-detect tv fork [10:59:11] [INFO]::MAIN: SickBeard:tv fork auto-detection found custom params {'force': None, 'dir': None, 'process_method': None} [10:59:11] [INFO]::MAIN: SickBeard:tv fork set to custom [10:59:12] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/Steven.Universe.S01E34.HDTV.x264-W4F [10:59:12] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/Steven.Universe.S01E34.HDTV.x264-W4F [10:59:12] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request [10:59:46] [ERROR]::SICKBEARD: Server returned status 500 [10:59:46] [ERROR]::MAIN: A problem was reported in the /share/Download/nzbToMedia/nzbToSickBeard.py script. SickBeard: Failed to post-process - Server returned status 500!
I got that status 500 error because i removed the username and password from the sickrage setting to login to the program. I put it back in and I'm now getting my original error again.
[11:09:42] [INFO]::MAIN: Loading config from [/share/MD0_DATA/Download/nzbToMedia/autoProcessMedia.cfg] [11:09:42] [INFO]::MAIN: Checking database structure... [11:09:42] [INFO]::MAIN: Checking if git needs an update [11:09:43] [INFO]::MAIN: No update needed [11:09:43] [INFO]::MAIN: nzbToMedia Version:9b143cd6f2eb2edc14f32149ed9e4532c3ecd7c6 Branch:dev (Linux 3.4.6) [11:09:43] [WARNING]::MAIN: Failed to locate ffprobe. Video corruption detection disabled! [11:09:43] [WARNING]::MAIN: Install ffmpeg with x264 support to enable this feature ... [11:09:43] [INFO]::MAIN: ######################################################### [11:09:43] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ## [11:09:43] [INFO]::MAIN: ######################################################### [11:09:43] [INFO]::MAIN: Script triggered from SABnzbd [11:09:44] [INFO]::MAIN: Auto-detected SECTION:SickBeard [11:09:44] [INFO]::MAIN: Calling SickBeard:tv to post-process:Steven.Universe.S01E33.HDTV.x264-W4F.nzb [11:09:44] [INFO]::MAIN: Attempting to auto-detect tv fork [11:09:44] [INFO]::MAIN: SickBeard:tv fork auto-detection found custom params {} [11:09:44] [INFO]::MAIN: SickBeard:tv fork set to custom [11:09:45] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/Steven.Universe.S01E33.HDTV.x264-W4F [11:09:45] [INFO]::MAIN: FLATTEN: Flattening directory: /share/MD0_DATA/Download/sabnzbd/complete/TV/Steven.Universe.S01E33.HDTV.x264-W4F [11:09:45] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request [11:09:45] [POSTPROCESS]::SICKBEARD: <!DOCTYPE html> [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD:
[11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD:[11:09:45] [POSTPROCESS]::SICKBEARD:
[11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD:
[11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD: [11:09:45] [POSTPROCESS]::SICKBEARD:
[11:09:45] [POSTPROCESS]::SICKBEARD:[11:09:45] [POSTPROCESS]::SICKBEARD: