Post Process Script error - No attribute session [Sickrage]

Get help with all aspects of SABnzbd
Forum rules
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.
Post Reply
glasgow_xbox
Newbie
Newbie
Posts: 1
Joined: August 28th, 2015, 9:44 pm

Post Process Script error - No attribute session [Sickrage]

Post by glasgow_xbox »

Sabnzbd is Sysload: 1.70 | 2.29 | 3.41 | V=2343M R=65M V - 0.7.20

Each episode I download fails to run the post processing script and results in the following error:


Loading config from /usr/local/sickbeard-custom/var/SickBeard/autoProcessTV/autoProcessTV.cfg

Opening URL: http://localhost:8083/home/postprocess/processEpisode
Traceback (most recent call last):
File "/usr/local/sickbeard-custom/var/SickBeard/autoProcessTV/sabToSickBeard.py", line 29, in <module>
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7])
File "/volume1/@appstore/sickbeard-custom/var/SickBeard/autoProcessTV/autoProcessTV.py", line 128, in processEpisode
sess = requests.Session()
AttributeError: 'module' object has no attribute 'Session'

I have changed chmod 777 for the folders, scripts. Reinstalled Sick rage, Couchpotato and SABnzbd.
Movies have no problem downloading, TV episode download without issue - but the post processing rename never works.
I have updated the post processing script to sabtosickbeard.py and updated autoprocesstv.cfg to reflect the port 8083 for the sickrage.

been working on it for some time and have reached my limit.

Any suggestions?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Post Process Script error - No attribute session [Sickra

Post by sander »

A Sickrage problem ... so wouldn't you get more help on a Sickrage forum? I have never used Sickrage.
Possibly useful: https://github.com/SiCKRAGETV/sickrage- ... ssues/1730 and https://github.com/SiCKRAGETV/sickrage- ... issues/442

Are you running on Synology, just like the two posters of the github issues?

FWIW

Code: Select all

sess = requests.Session()
AttributeError: 'module' object has no attribute 'Session'
means that there is a module 'requests' (a standard python module), but it has no function Session(), which is strange, because when I try (in plain python), it works:

Code: Select all

$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> sess = requests.Session()
>>> 
So ... you could try the interactive python above on your system.
langers
Newbie
Newbie
Posts: 4
Joined: June 15th, 2019, 5:29 pm

Re: Post Process Script error - No attribute session [Sickrage]

Post by langers »

Hi Guys,

Sorry to revive this old thread but I am now getting this issue after a recent SabNZBD update.

I am running SABnzbd 2.3.8 on a Synology NAS and SickGear BRANCH: master / COMMIT: 1180c23 @ 0.19.5. Also, Python Version: 2.7.14 (default, May 28 2018, 15:26:34) [GCC 4.3.2].

Following the update to the above version of Sab I noticed the issue started. I have already following a suggestion on github. - Although I can't post the URL as I'm a new user on here.

My Linux knowledge is pretty lacking and my Python is none existent. If there's anything I need to check please let me know and I hope that someone can help.

Thanks in advance!

Langers
Puzzled
Full Member
Full Member
Posts: 160
Joined: September 2nd, 2017, 3:02 am

Re: Post Process Script error - No attribute session [Sickrage]

Post by Puzzled »

I assume you mean this? https://github.com/SickGear/SickGear/issues/1029

Can you open command line on the NAS, run these commands and post the results?
python -m pip install -U requests
python -c "import requests; print(requests.__version__)"
langers
Newbie
Newbie
Posts: 4
Joined: June 15th, 2019, 5:29 pm

Re: Post Process Script error - No attribute session [Sickrage]

Post by langers »

Hi,

Sorry for the insanely late reply. Here is the output:

python -m pip install -U requests DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Requirement already up-to-date: requests in /lib/python2.7/site-packages (2.22.0) Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in /lib/python2.7/site-packages (from requests) (2.8) Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /lib/python2.7/site-packages (from requests) (3.0.4) Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /lib/python2.7/site-packages (from requests) (2019.3.9) Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /lib/python2.7/site-packages (from requests) (1.25.2) WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
python -c "import requests; print(requests.__version__)"
2.22.0

Thanks

Langers
langers
Newbie
Newbie
Posts: 4
Joined: June 15th, 2019, 5:29 pm

Re: Post Process Script error - No attribute session [Sickrage]

Post by langers »

I have since run:
pip install --upgrade pip --user DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting pip Using cached /00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl Installing collected packages: pip Successfully installed pip python -c "import requests; print(requests.__version__)" 2.22.0
python -m pip install -U requests DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Requirement already up-to-date: requests in /lib/python2.7/site-packages (2.22.0) Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in /lib/python2.7/site-packages (from requests) (2.8) Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /lib/python2.7/site-packages (from requests) (3.0.4) Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /lib/python2.7/site-packages (from requests) (2019.3.9) Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /lib/python2.7/site-packages (from requests) (1.25.2)
python -c "import requests; print(requests.__version__)"
2.22.0
langers
Newbie
Newbie
Posts: 4
Joined: June 15th, 2019, 5:29 pm

Re: Post Process Script error - No attribute session [Sickrage]

Post by langers »

Some possibly other pertinent information. I have also got Python 3.4.1-0032 installed as well as Python 2.7.14-19.

I think v2.7 was installed at the same time as SabNZBD 2.3.9-40, as part of the package which came from the Synology Community repo. V3.4 is from the official Synology repo.
Post Reply