Embedded script causing error

Posted on
Fri Jul 28, 2017 4:24 am
lochnesz offline
Posts: 366
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Embedded script causing error

Hi,

Any embedded script I run causes a time out error. I disabled all scripts to run a test script only.

Code: Select all
28 Jul 2017, 12:19:00
   Schedule                        test script
   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 97939)
   Stopped "embedded script executor host"

28 Jul 2017, 12:19:30
   Schedule                        test script
   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 97940)
   Stopped "embedded script executor host"

28 Jul 2017, 12:20:00
   Schedule                        test script
   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 97941)
   Stopped "embedded script executor host"

28 Jul 2017, 12:20:30
   Schedule                        test script
   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 97942)
   Stopped "embedded script executor host"


This example is a script with one line to write a text to log:
Code: Select all
#!/usr/bin/env python
#test script
#by lochnesz
#version 1.0

#debug
indigo.server.log ("Test script completed")

Any ideas?

Thanks!
Peter

Posted on
Fri Jul 28, 2017 5:03 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Embedded script causing error

My guess is that your Python environment variable or your Python installation may be messed up.

What happens if you change the shebang to your Indigo-preferred Python version?*
Does the embedded script still time out if you remove the shebang line?
Does the script ever complete if you run it as a linked script?

* Indigo 6: #!/usr/bin/env python2.6
* Indigo 7: #!/usr/bin/env python2.7

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri Jul 28, 2017 5:29 am
lochnesz offline
Posts: 366
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Embedded script causing error

Removing the shebang line doesn't work, neither does changing to #!/usr/bin/env python2.7.

I am not on the server now, accessing it remotely with Indigo client only, so I can't try to run the script as a linked script.
I also haven't restarted the computer to be able to troubleshoot this issue.

Posted on
Fri Jul 28, 2017 8:51 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Embedded script causing error

You're sure you don't have any other embedded scripts that are running from a trigger or schedule?

The shebang line shouldn't be included though it should be ignored. Try a new embedded script with just the last line of your script:

Code: Select all
indigo.server.log("testing")


Also, what happens when you select the Plugins->Open Scripting Shell menu item? Does it open a terminal window? What happens when you run the line above in it?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jul 28, 2017 3:08 pm
lochnesz offline
Posts: 366
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Embedded script causing error

The shell works fine, but not the embedded script. I can't even compile the script, I get a "script execution timeout" in the GUI.
No other scripts are running, embedded or linked. I have disabled them.

Posted on
Fri Jul 28, 2017 3:12 pm
lochnesz offline
Posts: 366
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Embedded script causing error

I am on Indigo version 7.0.1, could it be related to that version?

Posted on
Fri Jul 28, 2017 3:52 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Embedded script causing error

Couldn't hurt to upgrade to the latest release. Also reboot the Mac.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Jul 29, 2017 2:26 am
lochnesz offline
Posts: 366
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Embedded script causing error

I didn't want to do anything like that until you said so for you to be able to troubleshoot and/or collect debug info. Restarted Indigo (only application, not Mac), and now it works. Will upgrade now too.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 20 guests