question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, Im a programmer by trade, but a total newbie to Python, especially for EV3.

I need to add a new wheel. It’s the Motorcycle wheel (part: 88517c02) (100.6 D, 17 W). I created the class in the wheel.py file. VSCode recognizes it, but when trying to run the code on the EV3, I get the following: File “/home/robot/vscode-hello-python-master/hello.py”, line 8, in <module> from ev3dev2.wheel import MCTire ImportError: cannot import name ‘MCTire’

What am I missing?

  • **ev3dev version:4.14.96-ev3dev-2.3.2-ev3
  • **ev3dev-lang-python version:
||/ Name                                 Version                 Architecture            Description
+++-====================================-=======================-=======================-==============================================================================
ii  micropython-ev3dev2                  2.0.0~beta3             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~beta3             all                     Python language bindings for ev3dev

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dwalton76commented, Jan 12, 2020

I am not familiar with the workflow for using VSCode to edit and deploy changes to ev3dev-lang-python but I can walk you through how to get this up and running (just not using VSCode).

  • ssh to your ev3
  • $ git clone https://github.com/ev3dev/ev3dev-lang-python.git
  • $ cd ev3dev-lang-python
  • $ export PYTHONPATH=/home/robot/ev3dev-lang-python/
  • use an editor like nano or vim to edit ./ev3dev2/wheel.py to add your new wheel class
  • copy your hello.py program to your EV3
  • $ python3 hello.py
0reactions
kpu979commented, Jan 14, 2020

@dlech – Thank you!!! I’ve successfully connected my EV3 via usb to my mac and shared out the internet to it.

The issue now is when I download/run hello.py from VSCode, it fails… but when I run the code via SSH (or directly from EV3, it works. Its a cludgy workflow, but I’ll work with this for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The New Wheel Electric Bikes
San Francisco, Oakland, & Marin electric bike store of Benno, Gazelle, Orbea, Riese & Müller, Specialized Turbo, Stromer, Tern, & Urban Arrow.
Read more >
THE NEW WHEEL - Home - Facebook
THE NEW WHEEL. 2490 likes · 1 talking about this · 20 were here. The New Wheel: Electric Bikes / Service / Goods...
Read more >
Onewheel // Future Motion
Join the club to make new friends, learn something new, and have your mind blown. As Low As $58 a Month. Ride Now...
Read more >
THE NEW WHEEL (@newwheel) · Twitter
The new #stromer #st7 is incredible. Karen and Jason are here to tell you all about it: Review: All new Stromer ST7 Super...
Read more >
The New Wheel (@newwheel) • Instagram photos and videos
The San Francisco Bay Area's electric bike shop & full service bicycle repair. #thenewwheel. Visit us in San Francisco, Marin & Oakland. bio.site/newwheel....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found