Updating GoPiGo3 library per manual instructions

gopigo3

#1

I was trying to check for updates the GoPiGo3 library as instructed on the GoPiGo3 Documentation (Version April 26, 2018) and got the error (see image attached)

I was just trying the command for the fun of it - I think I am up to date - but now I am curious on why it did not work.


#2

Does it behave better if you use a capital L instead of a lower case l?
curl -kL …


#3

I did try the :L" and nope does not work either


#4

@dennys

If you run the curl command from a terminal window without piping it to bash, you can see what it is returning.

running the command as you posted it (looks like the file from your image):

running again with change suggested by cleoqc (this looks like the correct file to update the gopigo3 when piped to bash):

try again, running:
curl -kL dexterindustries.com/update_gopigo3 | sudo bash


#5

Excellent it work! THX! :slight_smile:


#6

Wait! crap! my easygopigo3 now is gone???

import easygopigo3

Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named easygopigo3


#7

I had easygopigo3 library available to me all this time – then proceeded to update with:

curl -kL dexterindustries.com/update_gopigo3 | sudo bash

And now is gone?


#8

Here is the activity while I was updating.
dump.txt (63.4 KB)


#9

So I can import things like “time” but NOT easygopigo3 or gopigo3 - rendering the robot useless :frowning:

import time

import gopigo3
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named gopigo3

import easygopigo3
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named easygopigo3


#10

Ok, so I decided the shortest route was to re-flash Rasbien OS and run DI Software update and whoala! my access to easygopigo3 and gopigo3.

For the time being I am not planning to touch the string “curl -kL dexterindustries.com/update_gopigo3 | sudo bash” Nope!


#11

@dennys
I’m flabbergasted… I checked the dump file that you so kindly shared and it does show that the gopigo3 and easygopigo3 libraries were installed. I have no idea why you couldn’t reach them.

Are you using Python3 or 2? (the library should be available to both versions anyway).


#12

Yeah I know - very weird, I too thought the upgrade was fine by looking at the log ?

I am using python 3 – but more importantly, I could make it happen while in VNC and trying to run some of the files at Software/Python/Examples. So with that I knew it was not a PyCharm thingy.

Anyway I just re-flashed the SD and evening went to normal :slight_smile:

When I know I have time to spare I will try again and see what happen.


#13

I had some time today, so I ran some tests on this topic.

  • loaded SD with a fresh stretch image (stretch.0.0.2.img)
  • wrote a small test script:
import time
import easygopigo3 as easy

gpg = easy.EasyGoPiGo3()
servo = gpg.init_servo()

print(gpg.volt())

servo.rotate_servo(80)
time.sleep(2)
servo.rotate_servo(90)
time.sleep(2)
servo.rotate_servo(120)
  • ran test script with Python 2.7.13 and Python 3.5.3
    • all worked as expected
  • executed update command with the following result:
pi@dex:~ $ curl -kL dexterindustries.com/update_gopigo3 | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   178  100   178    0     0   1139      0 --:--:-- --:--:-- --:--:--  1148
100   178  100   178    0     0    567      0 --:--:-- --:--:-- --:--:--   567
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 11956  100 11956    0     0  15368      0 --:--:-- --:--:-- --:--:-- 15368
GoPiGo3 installer script must be run with "pi" user. Exiting.
pi@dex:~ $
  • ran update command again , without sudo:
pi@dex:~ $ curl -kL dexterindustries.com/update_gopigo3 | bash
  • this time the update completed successfully
  • ran test script again with Python 2.7.13 and Python 3.5.3
    • again, all worked as expected
  • loaded SD with a fresh jessie image (2017.09.28_Dexter_Industries_jessie.img)
  • recreated the same test script as above and ran with Python 2.7.9 and Python 3.4.2
    • had do downgrade firmware, then worked as expected
  • update command:
curl -kL dexterindustries.com/update_gopigo3 | sudo bash
  • same result as before:
pi@dex:~ $ curl -kL dexterindustries.com/update_gopigo3 | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   178  100   178    0     0   1139      0 --:--:-- --:--:-- --:--:--  1148
100   178  100   178    0     0    567      0 --:--:-- --:--:-- --:--:--   567
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 11956  100 11956    0     0  15368      0 --:--:-- --:--:-- --:--:-- 15368
GoPiGo3 installer script must be run with "pi" user. Exiting.
pi@dex:~ $
  • ran update command again , without sudo:
pi@dex:~ $ curl -kL dexterindustries.com/update_gopigo3 | bash
  • this time the update completed successfully
  • attempting to run my test script produced the following output:
pi@dex:~/kr $ test_gpg.py
Traceback (most recent call last):
  File "servo_120.py", line 1, in <module>
    import easygopigo3 as easy
  File "build/bdist.linux-armv7l/egg/easygopigo3.py", line 11, in <module>
ImportError: cannot import name Mutex
pi@dex:~/kr $ 
pi@dex:~/kr $ sudo pip uninstall gopigo -y
Uninstalling GoPiGo:
  Successfully uninstalled GoPiGo
pi@dex:~/kr $ sudo pip3 uninstall gopigo -y
Uninstalling GoPiGo:
  Successfully uninstalled GoPiGo
pi@dex:~/kr $ 
  • re-ran the update command:
curl -kL dexterindustries.com/update_gopigo3 | bash
  • after this, my test script again ran as expected
  • I had a thought that perhaps this was fixed by just running the update a second time
    • reloaded SD with jessie image
    • ran update 2 times
    • test script still fails with:
pi@dex:~/kr $ test_gpg.py
Traceback (most recent call last):
  File "servo_120.py", line 1, in <module>
    import easygopigo3 as easy
  File "build/bdist.linux-armv7l/egg/easygopigo3.py", line 11, in <module>
ImportError: cannot import name Mutex
pi@dex:~/kr $ 

#14

Glad I was not entirely crazy :wink:


#15

@kev.r, @dennys,

On Friday we made a few more changes that are quite important. Tomorrow or in 2 days tops we’ll have the official image up on our stream - and by then there won’t be any other problems.

What it’s still unexplained is why installing the gopigo3 package doesn’t install I2C_mutex too, because we’ve tried it too we couldn’t replicate it. In light of all these, could you rip the image and send it to us? You can send it at my email address and I’ll take care of it: robert@dexterindustries.com.

Anyway, for the time being, we can fix this just by installing the package directly. For this, please run the following commands:

git clone https://github.com/DexterInd/RFR_Tools
cd RFR_Tools/miscellaneous
sudo python setup.py install
sudo python3 setup.py install

That should get everything installed for you.

Please let me know if this solves your problem.

Thank you!


#16

@RobertLucian,

Thanks for looking into this, I was just trying to replicate the problems @dennys was having.

I’ll be using the stretch image from now on and it seems to be working now without errors.


#17

Great THX @RobertLucian – I will wait for the new image and try!

And thanks to @kev.r for replicating what I saw previously!


#18

@dennys, @kev.r,

We’ve published the image, but at this moment it’s still a beta - for all intents and purposes it’s considerate to be the final one, but we still need to do a few sanity checks. Here’s the link to the image:

https://sourceforge.net/projects/dexterindustriesraspbianflavor/files/Beta/2018.06.01_Raspbian_For_Robots_by_Dexter_Industries.zip/download

Let us know if things go smoothly for you.

Thank you!

PS: With this update we’re supporting Stretch - Jessie works too, but our main focus will be Stretch.

Edit: @dennys, @kev.r the official is now out of the door.