blacktwin / JBOPS

Just a Bunch Of Plex Scripts
1.66k stars 308 forks source link

Python newbie problem #332

Closed nicolasrata closed 1 year ago

nicolasrata commented 2 years ago

Hi, I'm trying to use the hide spoilers script but I keep getting the same error. Tautulli Notifiers :: Script error: Traceback (most recent call last): File "/Users/Ni********a/JBOPS/utility/hide_episode_spoilers.py", line 31, in <module> import requests ImportError: No module named requests

I'm using a Mac mini M1, macOS 12.2.1 Tautulli installed via the installer python3.9.10 installed with Homebrew and aliased ton python pip 22.0.3 installed with Homebrew requests in /opt/homebrew/lib/python3.9/site-packages (2.27.1)

Any idea why it keeps asking for requests?

Thanks

blacktwin commented 2 years ago

You're missing the requests python module. pip install requests you'll need plexapi as well. This is mentioned in the README file. Though this guide section is for Windows, there is still some useful information here.

nicolasrata commented 2 years ago

Hi, I have installed the requirements before running the script. plexapi and requests are installed. % pip freeze PlexAPI==4.9.1 requests==2.27.1 requests-cache==0.5.2 requests-oauthlib==1.3.0

The script run ok manually but in Tautulli it keeps outputting the same error. I see Tautulli uses Python3.9.10. I have add to my path export PATH="/opt/homebrew/opt/python@3.9/libexec/bin:$PATH" which python shows /opt/homebrew/opt/python@3.9/libexec/bin/python

Don't understand why it won't work from Tautulli. Any idea?

I tried to test the script in Tautulli using nopythonpath and python3 in the arguments but I still got the error...