Describe the bug
Python in the standard docker container for Tautulli (linuxserver/tautulli) doesn't include requests or plexapi, so the hide_episode_spoilers script fails when it tries to import them.
Provide logs
Tautulli logs - Please follow Tautulli's guide for sharing logs. Please provide a link to a gist or pastebin.
PlexAPI logs - Create or find your logs location for PlexAPI. Please follow Tautulli's guide for sharing logs. Please provide a link to a gist or pastebin.
Link to script with bug/issue
https://github.com/blacktwin/JBOPS/blob/master/utility/hide_episode_spoilers.py
To Reproduce
Run script on fresh install of linuxserver/tautulli
** Possible Solution **
Rewrite the import section to install the packages if they are needed.
import subprocess
import sys
def import_or_install(package):
try:
__import__(package)
except ImportError:
subprocess.check_call(['python3', '-m', 'pip', 'install', package])
__import__(package)
import_or_install("requests")
import requests
Describe the bug
Python in the standard docker container for Tautulli (linuxserver/tautulli) doesn't include requests or plexapi, so the hide_episode_spoilers script fails when it tries to import them.
Provide logs
Tautulli logs - Please follow Tautulli's guide for sharing logs. Please provide a link to a gist or pastebin.
PlexAPI logs - Create or find your logs location for PlexAPI. Please follow Tautulli's guide for sharing logs. Please provide a link to a gist or pastebin.
Link to script with bug/issue
https://github.com/blacktwin/JBOPS/blob/master/utility/hide_episode_spoilers.py
To Reproduce
Run script on fresh install of linuxserver/tautulli
** Possible Solution **
Rewrite the import section to install the packages if they are needed.