Home/Support/Support Forum/Script runs fine within Digi ESP, but keeps restarting when set to auto-start
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Script runs fine within Digi ESP, but keeps restarting when set to auto-start

0 votes
Hi,
My Python code runs fine within the Digi ESP as a "Remote Digi Python Application" on my current device ConnectPort X2D, but when the same script is run by the ConnectPort's Auto-Start feature (with "Action On Exit" set to Restart), it is continuously restarted. Why would the same code crash and exit when run by the gateway itself as opposed to running fine inside the same device from the Digi ESP?
asked Mar 20, 2016 in Python by ccakmak New to the Community (3 points)

Please log in or register to answer this question.

2 Answers

0 votes
What happens if you run it from the command line of the connectPort X2D unit?

#> python (filename).py

This will show all activity including any errors that are being seen that may be causing the python script to fail on the Digi unit.

The X2D units only support python 2.4 and may require some additional files be uploaded to the unit depending on what is seen.
answered Mar 21, 2016 by userid0 Veteran of the Digi Community (2,156 points)
edited Mar 21, 2016 by userid0
0 votes
I see, thanks for this valuable information.

#> python hbs_tayas_2_4.py

Traceback (most recent call last):
File "WEB/python/hbs_tayas_2_4.py", line 16, in ?
import urllib
ImportError: No module named urllib

#>

This shows that my X2D is missing the needed urllib.
answered Mar 21, 2016 by ccakmak New to the Community (3 points)
...