blacktwin / JBOPS

Just a Bunch Of Plex Scripts
1.67k stars 307 forks source link

Tautulli Notifiers :: Failed to run script: [Errno 2] No such file or directory #160

Closed sotiris-bos closed 5 years ago

sotiris-bos commented 5 years ago

I am getting this error on FreeNAS.

Can you help me?


2019-05-07 21:51:47 | INFO | Tautulli Notifiers :: Updated notification agent: Script (notifier_id 1).
-- | -- | --
2019-05-07 21:49:01 | DEBUG | Tautulli ActivityHandler :: Session 10 paused.
2019-05-07 21:48:54 | ERROR | Tautulli Notifiers :: Failed to run script: [Errno 2] No such file or directory
2019-05-07 21:48:54 | DEBUG | Tautulli Notifiers :: Executing script in a new thread.
2019-05-07 21:48:54 | DEBUG | Tautulli  Notifiers :: Full script is: ['python',  u'/usr/local/lib/python2.7/site-packages/plexapi/killstream/kill_stream.py',  '--jbop', 'allStreams', '--userId', '23386792', '--notify', '1',  '--killMessage', 'Hey Bob, we need to talk!']
2019-05-07 21:48:54 | DEBUG | Tautulli  Notifiers :: Trying to run notify script, action: play, arguments:  [u'--jbop', u'allStreams', u'--userId', '23386792', u'--notify', u'1',  u'--killMessage', u'Hey Bob, we need to talk!']
2019-05-07 21:48:54 | INFO | Tautulli NotificationHandler :: Preparing notification for notifier_id 1.
blacktwin commented 5 years ago

Check your permission and make sure the file is accessible from Tautulli.

sotiris-bos commented 5 years ago

Everything is chmoded 777 inside the plexapi folder. Everything is set up inside a jail for tautulli so should be accessible. Do I need to have the scripts inside the plexapi folder as I do now?

Edit: I only had python2.7 installed in the jail. I installed python3 and now it seems to be working correctly. I am getting an error but it works.


2019-05-08 10:29:17 | DEBUG | Tautulli ActivityHandler :: Removing sessionKey 19 ratingKey 4407 from session queue
-- | -- | --
2019-05-08 10:29:17 | DEBUG | Tautulli  ActivityProcessor :: Play duration for session 19 ratingKey 4407 is 7  secs which is less than 60 seconds, so we're not logging it.
2019-05-08 10:29:17 | DEBUG | Tautulli ActivityHandler :: Session 19 stopped.
2019-05-08 10:29:17 | DEBUG | Tautulli ActivityHandler :: Session 19 has changed transcode decision.
2019-05-08 10:29:11 | INFO | Tautulli Notifiers :: Script notification sent.
2019-05-08 10:29:11 | ERROR | Tautulli Notifiers :: Script error:     usage: kill_stream.py [-h] --jbop {stream,allStreams,paused} [--userId USERID]                                                 [--username USERNAME] [--sessionId SESSIONID]                                                 [--notify NOTIFY] [--limit LIMIT] [--interval INTERVAL]                                                 [--killMessage KILLMESSAGE [KILLMESSAGE ...]]                                                 [--richMessage {discord,slack}]                                                 [--serverName SERVERNAME] [--plexUrl PLEXURL]                                                 [--posterUrl POSTERURL] [--richColor RICHCOLOR]                                                 [--debug]     kill_stream.py: error: the following arguments are required: --jbop
2019-05-08 10:29:10 | INFO | Tautulli Notifiers :: Script notification sent.
2019-05-08 10:29:10 | DEBUG | Tautulli Notifiers :: Executing script in a new thread.
2019-05-08 10:29:10 | DEBUG | Tautulli Notifiers :: Full script is: ['python', u'/config/scripts/killstream/kill_stream.py']
2019-05-08 10:29:10 | DEBUG | Tautulli Notifiers :: Trying to run notify script, action: api, arguments: []
2019-05-08 10:29:10 | INFO | Tautulli NotificationHandler :: Preparing notification for notifier_id 1.
2019-05-08 10:29:10 | INFO | Tautulli Pmsconnect :: Terminating session 19 (session_id y4k1m9yw73ryhw082g7v13fw).
2019-05-08 10:29:10 | DEBUG | Tautulli Notifiers :: Executing script in a new thread.
2019-05-08 10:29:10 | DEBUG | Tautulli  Notifiers :: Full script is: ['python',  u'/config/scripts/killstream/kill_stream.py', '--jbop', 'allStreams',  '--userId', '23386792', '--notify', '1', '--killMessage', 'Hey Bob, we  need to talk!']
2019-05-08 10:29:10 | DEBUG | Tautulli  Notifiers :: Trying to run notify script, action: play, arguments:  [u'--jbop', u'allStreams', u'--userId', '23386792', u'--notify', u'1',  u'--killMessage', u'Hey Bob, we need to talk!']
2019-05-08 10:29:10 | INFO | Tautulli NotificationHandler :: Preparing notification for notifier_id 1.
2019-05-08 10:29:10 | DEBUG | Tautulli NotificationHandler :: Custom condition evaluated to 'True'. Conditions: [True].
2019-05-08 10:29:10 | DEBUG | Tautulli NotificationHandler :: Checking custom notification conditions for notifier_id 1.
2019-05-08 10:29:10 | DEBUG | Tautulli  ActivityHandler :: Session 19 started by user 23386792  (ficesedike@webgmail.info) with ratingKey 4407 (The Americans (2013) -  Pilot).

Sorry for the formatting, I don't know how to do it as you edited my post above.

blacktwin commented 5 years ago

For the formatting just wrap with 3 `

The script can be anywhere that your Tautulli instance can reach. The script should also be able to be executed from your Tautulli instance (whatever permissions you'd need for that). I do not use FreeNAS so I'm not sure what you'd need to change.

So is it working?

sotiris-bos commented 5 years ago

Yes it is working! Thank you for your time! I'll send you some beer money as soon as I get the chance