Git Product home page Git Product logo

Comments (10)

tronyx avatar tronyx commented on August 15, 2024

Seeing this one too, but almost every time the script kicks off:

PlexPy Notifiers :: Script error: Traceback (most recent call last): File "/app/plexpy/scripts/create_wait_kill_all.py", line 152, in if find_sessionID(response): File "/app/plexpy/scripts/create_wait_kill_all.py", line 123, in find_sessionID if s['sessionKey'] == sys.argv[1]: IndexError: list index out of range

from jbops.

blacktwin avatar blacktwin commented on August 15, 2024

Can you try these two instead?
https://github.com/blacktwin/JBOPS/blob/master/killstream/wait_kill_pause_notify_main.py
https://github.com/blacktwin/JBOPS/blob/master/killstream/wait_kill_pause_notify_sub.py
Same idea as before but using two scripts instead of creating files that may never delete themselves.

Use print() for the variables that causing issues.

def find_sessionID(response):

    sessions = []
    for video in response['MediaContainer']['Video']:
        print(video)
        if video['sessionKey'] == sys.argv[1]:
def find_sessionID(response):

    sessions = []
    for video in response['MediaContainer']['Video']:
        print(video['sessionKey'])
        print(sys.argv[1])
        if video['sessionKey'] == sys.argv[1]:

from jbops.

tronyx avatar tronyx commented on August 15, 2024

Will give them a shot and let you know. Thanks!

from jbops.

tronyx avatar tronyx commented on August 15, 2024

Pretty sure I put in all the settings correct, but I'm seeing the following error:

PlexPy Notifiers :: Script error: Traceback (most recent call last): File "/app/plexpy/scripts/wait_kill_pause_notify_main.py", line 25, in from plexapi.server import PlexServer ImportError: No module named plexapi.server

Edit: I'm an idiot and forgot to install plexapi.

from jbops.

tronyx avatar tronyx commented on August 15, 2024

Ok, still getting the following:

PlexPy Notifiers :: Script error: Traceback (most recent call last): File "/app/plexpy/scripts/wait_kill_pause_notify_main.py", line 56, in sessionKey = sys.argv[1] IndexError: list index out of range

from jbops.

blacktwin avatar blacktwin commented on August 15, 2024

can you provide more of the logs?

Something like:

2017-10-25 20:31:51 | DEBUG | PlexPy Notifiers :: Full script is: ['python', 'C:\\JBOPS\\killstream\\wait_kill_pause_notify_main.py', '7']
2017-10-25 20:31:51 | DEBUG | PlexPy Notifiers :: Trying to run notify script, action: pause, arguments: [u'7']
2017-10-25 20:31:50 | DEBUG | PlexPy Monitor :: Session 7 has been paused.

from jbops.

tronyx avatar tronyx commented on August 15, 2024

Here are more logs:

`

2017-11-01 11:05:26 ERROR PlexPy Notifiers :: Script error:     Traceback (most recent call last):         File "/app/plexpy/scripts/wait_kill_pause_notify_main.py", line 56, in             sessionKey = sys.argv[1]     IndexError: list index out of range
2017-11-01 11:05:26 DEBUG PlexPy Notifiers :: Executing script in a new thread.
2017-11-01 11:05:26 DEBUG PlexPy Notifiers :: Full script is: ['python', u'/app/plexpy/scripts/wait_kill_pause_notify_main.py']
2017-11-01 11:05:26 DEBUG PlexPy Notifiers :: Trying to run notify script, action: pause, arguments: None`

Could it be that it didn't set any args? Oh wait, I don't think I set the {session_key} arg in PlexPy....

facepalm

I'll test it again....

from jbops.

tronyx avatar tronyx commented on August 15, 2024

Ok, wound up with:

PlexPy Notifiers :: Script error: File "/config/scripts/wait_kill_pause_notify_sub.py", line 35 print('Error: {}'.format(e)) ^ IndentationError: expected an indented block

So I indented line 35 (last line) and now it seems to work. Waiting to see if it kills the stream.

from jbops.

tronyx avatar tronyx commented on August 15, 2024

Didn't work. The pyc script it creates is full of weird characters. Not sure if this is a permissions issue or what, but there isn't anything in the logs.

from jbops.

tronyx avatar tronyx commented on August 15, 2024

I just need to stop working on this stuff when I'm tired. It works.

from jbops.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.