Version: (SABnzbd Version: 1.1.1RC3l)
OS: (ubuntu 14.04.5 LTS)
Install-type: (Ubuntu repository)
Skin (if applicable): (n/a)
Firewall Software: (n/a
Are you using IPV6? (no)
Is the issue reproducible? (yes/no)
I has been running sickbeard and sabnzbd and the sabtosickbeard.py script was running perfectly. Decided to change to sickrage and sabnzbd. I updated autoProcessTV.py and autoProcessTV.cfg with my local settings and I can't get it to work.
I get this in the history page: Exit(1) NameError: global name ’HTTPBasicAuthHandler’ is not defined
And this on the script log: Loading config from /home/user/.sickrage/autoProcessTV/autoProcessTV.cfg
Opening URL: http://localhost:8081/home/postprocess/ ... 2FSeason+2
Traceback (most recent call last):
File "/home/user/.sickrage/autoProcessTV/sabToSiCKRAGE.py", line 31, in <module>
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7])
File "/home/user/.sickrage/autoProcessTV/autoProcessTV.py", line 118, in processEpisode
handler = HTTPBasicAuthHandler(password_mgr)
NameError: global name 'HTTPBasicAuthHandler' is not defined
Any help you could offer would be much appreciated.
Cheers,
Simon
sabToSiCKRAGE.py Issues
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: sabToSiCKRAGE.py Issues
You should ask the sickrage forum! Not completely sure why it's missing that handler..
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
-
- Newbie
- Posts: 10
- Joined: December 22nd, 2015, 3:26 am
Re: sabToSiCKRAGE.py Issues
Hi
Apparently they don't maintain it properly and unfortunately they disabled issues on Github (don't like that!).
However, the error is in the file as they only define when an ImportError occurs.
I've bad news and good news for you
The good news is, you can easily fix this issue by patching the file:
If you don't know patches then simply go to line 137 an replace this…
… with this…
WARNING: It's Python, so indentation matters
Now the bad news: Apparently with the new login form/mask, SiCKRAGE ignores HTTP Basic auth. So even now as the script performs correctly, SiCKRAGE will simply redirect you (or in this case the script) to the login page. Don't know how to fix it, because I didn't had a look at the SiCKRAGE source code so far.
But IMHO it's a PITA that they decided to drop issue support on GitHub To be honest, I think they no longer support these post processing scripts, because they don't work out of the box and the last update was 27 days ago Let's see what the future brings.
Cheers
Domi
Apparently they don't maintain it properly and unfortunately they disabled issues on Github (don't like that!).
However, the error is in the
Code: Select all
autoProcessTV.py
Code: Select all
HTTPBasicAuthHandler
I've bad news and good news for you
The good news is, you can easily fix this issue by patching the file:
Code: Select all
--- autoProcessTV.py.orig 2016-11-20 00:54:47.694745314 +0100
+++ autoProcessTV.py 2016-11-20 00:43:05.252957094 +0100
@@ -32,7 +32,6 @@
import configparser
import urllib.request as urllib2
from urllib.parse import urlencode
- HTTPBasicAuthHandler = urllib2.HTTPBasicAuthHandler
def processEpisode(dir_to_process, org_NZB_name=None, status=None):
@@ -115,7 +114,7 @@
try:
password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_mgr.add_password(None, url, username, password)
- handler = HTTPBasicAuthHandler(password_mgr)
+ handler = urllib2.HTTPBasicAuthHandler(password_mgr)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
Code: Select all
handler = HTTPBasicAuthHandler(password_mgr)
Code: Select all
handler = urllib2.HTTPBasicAuthHandler(password_mgr)
Now the bad news: Apparently with the new login form/mask, SiCKRAGE ignores HTTP Basic auth. So even now as the script performs correctly, SiCKRAGE will simply redirect you (or in this case the script) to the login page. Don't know how to fix it, because I didn't had a look at the SiCKRAGE source code so far.
But IMHO it's a PITA that they decided to drop issue support on GitHub To be honest, I think they no longer support these post processing scripts, because they don't work out of the box and the last update was 27 days ago Let's see what the future brings.
Cheers
Domi
-
- Newbie
- Posts: 10
- Joined: December 22nd, 2015, 3:26 am
Re: sabToSiCKRAGE.py Issues
Btw in case you're running SABnzbd and SiCKRAGE on the same instance, then you can probably use https://github.com/SiCKRAGETV/SiCKRAGE/ ... iCKRAGE.py. According to the source code, it needs to be placed in the right directory and it will import the SiCKRAGE Python module to open a web session.
Unfortunately I'm using Docker, which means there's no SiCKRAGE Python module in the SABnzbd docker image/container. I don't know if they're looking forward to replace with , but I think that would be a bad idea!
Unfortunately I'm using Docker, which means there's no SiCKRAGE Python module in the SABnzbd docker image/container. I don't know if they're looking forward to replace
Code: Select all
sabToSiCKRAGE
Code: Select all
mediaToSiCKRAGE
-
- Newbie
- Posts: 10
- Joined: December 22nd, 2015, 3:26 am
Re: sabToSiCKRAGE.py Issues
Just opened 2 bugs on their gitlab:
https://git.sickrage.ca/SiCKRAGE/sickrage/issues/2
https://git.sickrage.ca/SiCKRAGE/sickrage/issues/5
https://git.sickrage.ca/SiCKRAGE/sickrage/issues/2
https://git.sickrage.ca/SiCKRAGE/sickrage/issues/5