Jan-31-2018, 02:57 PM
I have created a python3 script for use on Raspberry pi 3 (approx. 300 lines of code), this program runs perfectly under the included Terminal utility. ie start Terminal, cd to myDir, enter "python myCode.py
BUT when I try to run it automatically at start-up I get an error message part way through the code, first 50 lines of code work ok,
error message is "syntax err: unexpected EOF while parsing" I cannot see any code problems at the message pointer.
I got the program to run automatically in Terminal at start-up by adding the following code to "/.config/lxsession/LXDE-pi/autostart"
Added code = "@lxterminal -e python -i /home/pi/myDir/myCode.py" (added before "@xscreensaver -no-splash" line).
The program uses operator keyboard and push button inputs to control a real world, real time, process via GPIO and various relays, switches and motors.
Can any one help?
I can supply the area of code which produces the error in auto-run mode if needed.
BUT when I try to run it automatically at start-up I get an error message part way through the code, first 50 lines of code work ok,
error message is "syntax err: unexpected EOF while parsing" I cannot see any code problems at the message pointer.
I got the program to run automatically in Terminal at start-up by adding the following code to "/.config/lxsession/LXDE-pi/autostart"
Added code = "@lxterminal -e python -i /home/pi/myDir/myCode.py" (added before "@xscreensaver -no-splash" line).
The program uses operator keyboard and push button inputs to control a real world, real time, process via GPIO and various relays, switches and motors.
Can any one help?
I can supply the area of code which produces the error in auto-run mode if needed.