No module named GoPiGo


#1

I have modified my own image by following your instructions:

1). Open the Terminal on your Raspberry Pi and clone the Dexter Industries GoPiGo Repository

git clone https://github.com/DexterInd/GoPiGo.git
2). A folder named GoPiGo should appear in you current working directory

3). Open it and go to Setup Files directory

cd Setup Files/
4). The install script is called install.sh . Make it executable

sudo chmod +x install.sh
5). Run the script

./install.sh

When I attempt to run a script such as basic_robot.py, I get :

Traceback (most recent call last):
File “/home/pi/GoPiGo/Software/Python/Examples/Basic_Robot_Control_GUI/basic_robot_gui.py”, line 45, in <module>
from gopigo import * #Has the basic functions for controlling the GoPiGo Robot
ImportError: No module named gopigo

I have read other posts and done the following:

try running the install script from here https://github.com/DexterInd/GoPiGo/tree/master/Setup following the directions on the Readme

and

looks like the install script did not work properly for you. Can you try running it again sudo chmod +x install.sh and then sudo ./install.sh and then try again

However, I continue to get the error. Please advise.


[Solved] Error Running the basic_robot.py example
#2

Hey,
Can you try running the setup.py program here: https://github.com/DexterInd/GoPiGo/tree/master/Software/Python which would install the library using: python setup.py install. Do let us know if this works for you.

-Karan


#3

Will do. I will get back to you.


#4

No go…

Traceback (most recent call last):
File “basic_robot.py”, line 39, in <module>
from gopigo import * #Has the basic functions for controlling the GoPiGo Robot
ImportError: No module named gopigo

I have attached a text file that includes the Traceback, the text generated by >>python setup.py install, and the log file from the complete test under truobleshooting.


#5

Sorry. Forgot to attach the file. Attached here.


#6

Hey dwphoto, what version of os are you using? Might ring a bell with an issue if we had an idea.

Also, if you put the gopigo.py file into the same directory you’ve got your python file you’re tyring to run, does it work, or just throw more errors?

Another route might be to specify the absolute file path and name in your import line, IE “/home/pi/GoPiGo/Software/Python/gopigo.py”

John


#7

NOOBS from raspberrypi.org installs

RASPBIAN WHEEZY
Full desktop image based on Debian Wheezy
Version:May 2015
Release date:2015-05-05
Kernel version:3.18

In the meantime I will try your suggestions and get back to you.


#8

I would try to specify the file path. YOu might also try to re-install the GoPiGo python package, but being sure to use “sudo” when you install it.


#9

I have the same error with dwphoto…
I try running the setup.py program again but Error 13 showed up.
Could someone help me out here?

$ python setup.py install
running install
running bdist_egg
running egg_info
writing GoPiGo.egg-info/PKG-INFO
error: [Errno 13] Permission denied: &#039;GoPiGo.egg-info/PKG-INFO&#039;

Thanks,
Keisuke


#10

Hi Keisuke,
Can you try running the setup as root and see if that helps: sudo python setup.py install.

-Karan


#11

Hi Karan,

It worked! Thank you :wink:
Now, I am trying to do “Basic Robot Control” and when I type “sudo python basic_robot.py”, I get:

Traceback (most recent call last):
  File &quot;basic_robot.py&quot;, line 39, in &lt;module&gt;
    from gopigo import *	#Has the basic functions for controlling the GoPiGo Robot
  File &quot;build/bdist.macosx-10.5-x86_64/egg/gopigo.py&quot;, line 33, in &lt;module&gt;
ImportError: No module named serial

Could you teach me how to solve this error?


#12

Hi Keisuke,
How are you running this program on the GoPiGo. Which image are you using on the raspberry Pi. If you are using your own image, have you installed all the packages needed for the GoPiGo. If you are running the Dexter Industries image, can you run the troubleshooting script by following the instructions from here: https://www.youtube.com/watch?v=ZMadpIEYq5o and post the output here.

-Karan


#13

Hello Karen,

Here is my result!

Thank you in advance,
Keisuke


#14

Hi keisuke826,
Are you using a dexter Industries raspbian for Robots Image, if so what is the version in the versions file on the Desktop. Can you also send a screenshot of the error you are getting.

-Karan


#15

Hello karan,

Yes, I am using a dexter Industries raspbian for Robots Image and the version is 6.7. I will attach a screenshot of the error I am getting.

-Keisuke


#16

Hi Keisuke,
How are you exactly running the program. Are you logged in via SSH. After you get the error, can you run i2cdetect -y 1 and avrdude -c gpio -p m328p and pwd and post the output of all the 3 commands. Did the motors on the GoPiGo work when you ran the troubleshooting script.

-Karan