×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

[Resolve] Python scripts for Ekos scheduler

  • Posts: 43
  • Thank you received: 2
Hi all,
I'm trying to use a python script at the end of scheduler process... but Ekos displays a message about the script failure, without any detailed explanation, nothing in logs...
I tried with the example we can find in the documentation :
#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
import os
import time
import sys
 
print "Turning on observatory equipment..."
sys.stdout.flush()
 
time.sleep(5)
 
print "Checking safety switches..."
sys.stdout.flush()
 
time.sleep(5)
 
print "All systems are GO"
sys.stdout.flush()
 
exit(0)
It's not working. Same failure message. Should i use python 3 ? Or is there any other requirements (i put execution rights). ?

Thanks for your help.

Arnaud D.
10 months 2 weeks ago #93393

Please Log in or Create an account to join the conversation.

Looks fine, just make sure it has execution rights (chmod +x)
10 months 2 weeks ago #93394

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 2
execution rights are good.
Here is the error displayed.

Two tries same result.


How to debug it ?
Last edit: 10 months 2 weeks ago by Arnaud.
10 months 2 weeks ago #93395
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 4
Hi,

I have put your script into Ekos and it works in Python 3 after some modifications.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 11 10:16:48 2023
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
import sys
print ("Turning on observatory equipment...")
sys.stdout.flush()
 
time.sleep(5)
 
print ("Checking safety switches...")
sys.stdout.flush()
 
time.sleep(5)
 
print ("All systems are GO")
sys.stdout.flush()

The following user(s) said Thank You: Arnaud
10 months 2 weeks ago #93396
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 2
Ok Thanks. I will try with python 3.
Documentation on scheduler web page is not up to date. Perhaps i can help to do it ?

Best Regards.

=> It works executing without errors...but without printing messages ....
Last edit: 10 months 2 weeks ago by Arnaud.
10 months 2 weeks ago #93397

Please Log in or Create an account to join the conversation.

Time to create page: 0.413 seconds