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?
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.
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 ?
ImportError: No module named urllib
This shows that my X2D is missing the needed urllib.