I am a beginner. I tried the Who’s at the door? project, but when I plugged in the last line, I got a syntax error:
except IOError:
SyntaxError: invalid syntax
>>>> except IOError:
File “<pyshell#57>”, line 1
Also, if I try to run this program, it won’t run. I use:
pi@dex ~ sudo python DetectBot.py
It show:
File “DetectBot.py” line 1
Python 2.7.3 (default, Mar 18 2014, 05.13.23)
^
SyntaxError: invalid syntax
It looks like you’re trying to paste a lot of code into either IDLE or you’re pasting some IDLE code into the file. Did you download the file directly from Github or find it on Raspbian for Robots?
Maybe you can attach the file you’re trying to run (rename it as a .txt file).
I went into the Dexter Industries’ grovepi folder and copied the code there, line by line. I cannot access it now, as I cannot reconnect to the Raspberry pi. The VNC viewer cannot connect. I’ve connected the pc to the pi with the Ethernet cable, but the VNC isn’t finding it. I have tried connecting it to the IP address and to dexter.local:1. Once I connect again, I will be able to access the file and attach it. Thank you for responding!