and .:/home/pi/Dexter/GoPiGo3/Software/Python:/home/pi/Dexter:
I had two RPI3, one works and one is not
following is what error:
pi@dex:~/ethan python jc-led.py
Traceback (most recent call last):
File "jc-led.py", line 3, 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:~/ethan
Would you mind redoing a DI Update? I think I have fixed it. I just need outside confirmation.
Also, please confirm, you’re on a GoPiGo3, and not a GoPiGo2, is that right?
I did sudo sh -c "curl -kL dexterindustries.com/update_sensors | bash"
again
and sudo reboot
Same result
login as: pi
pi@10.10.1.22's password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Apr 21 20:33:59 2018
pi@dex:~ $ cd ethan/
pi@dex:~/ethan $ python jc-led.py
Traceback (most recent call last):
File "jc-led.py", line 3, in <module>
import easygopigo3 as easy
File "build/bdist.linux-armv7l/egg/easygopigo3.py", line 11, in <module>
ImportError: cannot import name Mutex
Phew!
To answer you @brutus1214, we used to have the I2C_Mutex duplicated between the GoPiGo3 and the GoPiGo2, so we moved it to a centralized place. However, it seems that the old version was still on disk and still being picked up first, instead of the new one.
So removing the old libraries fixes the issue. I had asked you to remove the libraries for GoPiGo3, but forgot about GoPiGo2.
Also,
Thanks Cleo… but after the same error, and trying the same lines of code I still get a
“ImportError: cannot import name Mutex”.
This is happening when I am trying to run the BasicRobotControl *.py files.
I simply used the explorer login, to get the RPi desktop and am mere double clikcing the *.py files to test things out.
This reply was meant to be to an upper comment.
After I got done with the rest of this thread, I followed the uninstall commands and get a different error.
After attempting all the other scripts I get the same error.
I also pulled a script file from the DexterOS version and attempted to use it in the Raspbian for Robots OS (I have each loaded on separate SD cards) I get a similar error.
What I am starting to believe this is simply version of Python complaining.
This makes me think there should be a table, or some kind of a version check so that a user can know which pre-written script was built against which version of Python.
I am still learning but this is getting challenging.
I really would just like some simple blocks of code that can be loaded, tuned in python and eventually aggregated together into a larger bot type py file.
This is a totally different and unrelated error.
This particular project uses a special library to handle keyboard input. This library does not work from within Idle. If you run the script from a terminal, it should work.
You will run it with this command: python run_this.py