Error executing script

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Fri Sep 28, 2012 6:58 am
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Error executing script

I am using the directv plugin which worked fine until now. Recently I get the following error messages in the Event Log:

Embedded script executor host started
Error because embedded scripts execute sequentially they must complete their execution within 10 seconds.
Error modify the script to exit quickly or convert it to an external file (not embedded).
Stopping embedded script executor host (pid 42172)
Error process (pid 42172) failed to quit after polite request -- forcing it to quit now

What's happening?

Posted on
Fri Sep 28, 2012 8:30 am
jay (support) offline
Site Admin
User avatar
Posts: 18260
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Error executing script

That error is coming from an embedded Python script you have somewhere - not from the Directv plugin (plugins run in their own process and don't have any execution time limits). Disable any triggers or schedules that have embedded Python scripts then you can reenable them one at a time until you see the error again - that'll be the one that's causing the problem. You can then post the script here and we can help figure out why it's taking so long to finish.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Sep 28, 2012 10:33 am
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Error executing script

These scripts are called from a control page on which I have a visual representation of a directv remote control. There is an applescript on the control page for the button:

set the value of variable "Control_Page" to "MBR"
execute group "DirecTV Guide"

That calls this python script:

dvrPlugin = indigo.server.getPlugin("com.perceptiveautomation.indigoplugin.directvdvrcontrol")
if dvrPlugin.isEnabled():
keytopress = 'guide'
page=indigo.variables[815606601]
if page.value == 'Study':
address = indigo.variables[1547597612]
elif page.value == 'MBR':
address = indigo.variables[1749897041]
elif page.value == 'Library':
address = indigo.variables[1791505040]
elif page.value == 'Kitchen':
address = indigo.variables[631931047]
elif page.value == 'Theatre':
address = indigo.variables[1819365663]
elif page.value == 'Nook':
address = indigo.variables[242271121]
dvrPlugin.executeAction("sendKeyPress", props={'address': address.value, 'keyToPress': keytopress})

Any issue with having an Applescript call a Python script?

Posted on
Fri Sep 28, 2012 1:28 pm
jay (support) offline
Site Admin
User avatar
Posts: 18260
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Error executing script

So, you're calling the plugin from an embedded Python script - so that script isn't returning within the 10 second limit. I don't know why that would be the case - the action that you're asking the plugin to perform is pretty straight-forward. Most likely the problem is that the plugin isn't getting a network connection to the DVR within the 10 second limit of the script. That indicates to me that you have some kind of network issue perhaps - or it could be that your DVR is just really slow to respond (some of the older DVRs were significantly underpowered so if it was recording 2 shows it might actually not respond to network connections very quickly).

You could change the action group "DirecTV Guide" so that it calls an external Python script (and put the script you have embedded into a separate script file). That would cause the script to start up it's own process and it wouldn't have the 10 second limit. If it were me though I think I'd try to figure out why my DVR wasn't responding - from my testing here it responds very quickly so I think there's some network issue.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests