You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mtank.turn_degrees(20,90)
File "/home/robot/ev3dev-lang-python/ev3dev2/motor.py", line 2267, in turn_degrees
speed_native_units = speed.to_native_units(self.left_motor)
AttributeError: 'int' object has no attribute 'to_native_units'
**ev3dev version: 4.14.117-ev3dev-2.3.4-ev3
**ev3dev-lang-python version:
+++-====================================-=======================-=======================-==============================================================================
ii micropython-ev3dev2 2.0.0 all Python language bindings for ev3dev for MicroPython
ii python3-ev3dev 1.2.0 all Python language bindings for ev3dev
ii python3-ev3dev2 2.0.0 all Python language bindings for ev3dev
I should also warn you -- since you cloned the repository and are using your local copy from our development branch, there are changes in your version which aren't in past or future releases. Just a heads-up.
File "/home/robot/ev3dev-lang-python/ev3dev2/motor.py", line 2179, in follow_gyro_angle
assert speed_native_units <= MAX_SPEED, "Speed exceeds the max speed of the motors"
File "/home/robot/ev3dev-lang-python/ev3dev2/motor.py", line 101, in __ge__
return self.to_native_units() >= other.to_native_units()
AttributeError: 'float' object has no attribute 'to_native_units'
@WasabiFan -- I'd be happy to validate this issue.
to ensure I have the correct versions on my mac and EV3:
IN VS Code on my Mac (Im running in a virtual environment) -- console:
$ pip install python-ev3dev2 (do I use the --upgrade tag?)
Is there a better way to load EV3dev on the EV3 without refreshing the card?
Activity
WasabiFan commentedon Jan 19, 2020
@dwalton76 this looks like a bug in the gyro drive methods; they assume a speed unit class rather than defaulting to percent if a number is given.
Side-note: I think this comment line has a typo: https://github.com/ev3dev/ev3dev-lang-python/blob/ev3dev-stretch/ev3dev2/motor.py#L2279
@kpu979 Sorry! As a workaround, you should use a "speed unit" class (https://ev3dev-lang.readthedocs.io/projects/python-ev3dev/en/ev3dev-stretch/motors.html#units). In your case, this would look like:
I should also warn you -- since you cloned the repository and are using your local copy from our development branch, there are changes in your version which aren't in past or future releases. Just a heads-up.
WasabiFan commentedon Jan 19, 2020
Looks like you already know: #715 (comment)
kpu979 commentedon Feb 23, 2020
Hi, Here's another related bug:
When I do this:
I get this:
WasabiFan commentedon Mar 15, 2020
@dwalton76 Did you get a chance to look at these issues? Are they solved by #724?
I can try to get these things resolved today or otherwise soon before I publish a release.
WasabiFan commentedon Mar 23, 2020
I believe this is fixed in the
2.1.0release. @kpu979 would you be able to confirm this is fixed?dwalton76 commentedon Mar 23, 2020
sorry just saw this...it should be fixed via #724
kpu979 commentedon Mar 23, 2020
@WasabiFan -- I'd be happy to validate this issue.
to ensure I have the correct versions on my mac and EV3:
IN VS Code on my Mac (Im running in a virtual environment) -- console:
$ pip install python-ev3dev2 (do I use the --upgrade tag?)
Is there a better way to load EV3dev on the EV3 without refreshing the card?
dlech commentedon Mar 23, 2020
sudo apt update && sudo apt upgradekpu979 commentedon Apr 5, 2020
Sorry it took this long to get back to you. I've never been busier for my work.
I finally got everything updated and tweaked, and this works!!