Hello, i have Python 2.7 installed on my system AND Sabnzbd (which uses Python 3.
All works fine, but i made a script wich needs Pillow (PIL) to find out if the cover i put in the incompleet film folder is landscape or portrait
When portrait mode its renamed folder.jpg else its fanart.jpg
the demo works (without sabnzbd on python 2.7) but on sabnzbd it says its not installed.
So how to install Pillow on to Sabnzbd folder ??
Regards Richard
Installing Pillow in Sabnzbd
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: Installing Pillow in Sabnzbd
What kind of operating system do you use?
Linux or Windows?
Both require a different solution
Linux or Windows?
Both require a different solution
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
-
- Newbie
- Posts: 16
- Joined: August 22nd, 2019, 10:32 am
Re: Installing Pillow in Sabnzbd
I use windows 7 (ultimate)
Re: Installing Pillow in Sabnzbd
Then you would probably need to use a .bat file in which you call python2 directly and pass all arguments to it that you get from SABnzbd.
For example
https://github.com/sabnzbd/sabnzbd/blob ... stProc.cmd
You can modify it to pass all the % variables to a new call.
For example
https://github.com/sabnzbd/sabnzbd/blob ... stProc.cmd
You can modify it to pass all the % variables to a new call.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
-
- Newbie
- Posts: 16
- Joined: August 22nd, 2019, 10:32 am
Re: Installing Pillow in Sabnzbd
This is the demo script wich works from python direct in a commandline
import os, sys
print (sys.path)
from PIL import Image, ExifTags
image=Image.open("www.nzbserver.jpg")
width, height = image.size
print (width, height)
if width > height:
print ("landscape")
else:
print ("portrait")
import os, sys
print (sys.path)
from PIL import Image, ExifTags
image=Image.open("www.nzbserver.jpg")
width, height = image.size
print (width, height)
if width > height:
print ("landscape")
else:
print ("portrait")
-
- Newbie
- Posts: 16
- Joined: August 22nd, 2019, 10:32 am
Re: Installing Pillow in Sabnzbd
Ok i use a bat file to execute python 3.7 from category's wich works.
First i thought that i have to get variables back to sabnzbd, butt i stay on the external python for the whole script.
Sab still gives the results back after running the script like it normal did.
So thanks for the push in the right direction :-) Safihre
First i thought that i have to get variables back to sabnzbd, butt i stay on the external python for the whole script.
Sab still gives the results back after running the script like it normal did.
So thanks for the push in the right direction :-) Safihre
Re: Installing Pillow in Sabnzbd
Nice!
Maybe you can share the final script here?
Maybe you can share the final script here?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate