Basic_test_all.py errors


#1

I have downloaded the SD image and have booted to the desktop.
I have updated the firmware of the board to 1.1
after a reboot I am attempting to run basic_test_all.py for the first time

I run and get an error
pi@raspberrypi ~/Desktop/GoPiGo/Software/Python $ ./basic_test_all.py
from: can’t read /var/mail/gopigo
./basic_test_all.py: line 5: syntax error near unexpected token stop' ./basic_test_all.py: line 5:atexit.register(stop)’

looking at the python script it looks like the first error is from
from gopigo import *

atexit does exist in the directory
-rw-r–r-- 1 pi pi 1546885 Dec 5 23:43 atexit
-rwxr-xr-x 1 pi pi 818 Dec 5 23:46 basic_test_all.py
drwxr-xr-x 4 pi pi 4096 Jul 29 05:11 build
drwxr-xr-x 2 pi pi 4096 Jul 29 05:11 dist
drwxr-xr-x 15 pi pi 4096 Dec 5 23:19 Examples
drwxr-xr-x 2 pi pi 4096 Jul 29 05:11 GoPiGo.egg-info
-rwxr-xr-x 1 pi pi 8457 Dec 5 23:19 gopigo.py
drwxr-xr-x 3 pi pi 4096 Dec 5 23:19 other_scripts
-rwxr-xr-x 1 pi pi 613 Dec 5 23:19 README.md
-rwxr-xr-x 1 pi pi 462 Jul 29 03:49 setup.py
-rw-r–r-- 1 pi pi 11673465 Dec 5 23:41 sys
drwxr-xr-x 2 pi pi 4096 Jul 29 03:49 tests

Daniel


#2

I solved my issue. I was running the script from the shell and not running python then the script.

Daniel


#3

Good to hear. Glad it worked out.


#4

Now that I have everything working including VNC. I am having trouble testing the GoPiGo. I get this message too, but I don’t understand what it means regarding the shell.

Michael


#5

Hi Michael,
Try running the code with python and not the shell:
$python basic_test_all.py.

Let us know if this helps. If it does not, do post the error that you are getting.

-Karan


#6

Michael,
I think the original problem was that the python program was being called in the command line like this:

./basic_test_all.py

The correct way to call the program is:

sudo python basic_test_all.py

Best,

John