Runnig script from sequencer crashes SC3.3

Discussions, Bug Reports and Issues related to Beta versions of SharpCap
Post Reply
User avatar
DocHighCo
Posts: 52
Joined: Wed Nov 18, 2020 2:20 pm

Runnig script from sequencer crashes SC3.3

#1

Post by DocHighCo »

Hello,

I was trying to call a Python-Script from the sequencer. I am basically still a Python illiterate. But, even the simplest of scripts ("Hello world!") or the call of an empty script crashes Sharpcap. From the scripting tab it works with "Run script ...".
Any ideas what could be wrong?

Regards

Heiko
User avatar
DocHighCo
Posts: 52
Joined: Wed Nov 18, 2020 2:20 pm

Re: Runnig script from sequencer crashes SC3.3

#2

Post by DocHighCo »

Calling the sequencer from a script however works.
I made a little script to platesolve and recenter automatically while livestacking gets paused:

Code: Select all

import time
import System

m = 25 
i = 0

while True:
	while (i < m):
		l = SharpCap.LiveStacking.StackedFrames
		k = SharpCap.LiveStacking.StackedFrames 
		i = i + 1	
		print i, k
		
		while (k == l):
			time.sleep(1)
			k = SharpCap.LiveStacking.StackedFrames		
				
	SharpCap.LiveStacking.Parameters.Pause()
	SharpCap.Sequencer.RunSequence("MOUNT SOLVEANDSYNC")
	time.sleep(5)
	SharpCap.LiveStacking.Parameters.UnPause()
	i=0
Pretty crude, but I am not a Python pro. I tried it on a simulator. I still have to try in real.

Regards

Heiko
User avatar
admin
Site Admin
Posts: 13287
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Runnig script from sequencer crashes SC3.3

#3

Post by admin »

Hi,

thanks for the report, it looks like the new code to show the progress of the sequence wasn't happy with the fact that the step that runs the Python has an indeterminate estimate for the length of time it will take. I will have that fixed in the next version – also working out a way to make sure that if there is an error in the Python then it will be reported back to the sequencing.

Cheers, Robin
User avatar
DocHighCo
Posts: 52
Joined: Wed Nov 18, 2020 2:20 pm

Re: Runnig script from sequencer crashes SC3.3

#4

Post by DocHighCo »

Calling a script from the sequencer seems to work now in the new version. Thanks Robin.

Regards

Heiko
User avatar
admin
Site Admin
Posts: 13287
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Runnig script from sequencer crashes SC3.3

#5

Post by admin »

Hi,

good to hear that it's working for you - it was sadly just a silly error.

Robin
Post Reply