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.

Not work on Pyboard (and clones)

See original GitHub issue

micropy-cli version 2.1.0 not work on Pyboard (STM32F405RGT6 MCU) and it’s clones. stubs generation end with errors. On ESP32 work without problems.

micropy stubs create COM8
...
MicroPy  Pyboard  Stub module: writer
MicroPy  Pyboard  Stub module: ymodem
MicroPy  Pyboard  Stub module: zlib
MicroPy  ✔ Done!
MicroPy  Copying stubs...
Source directory /pyboard/stubs does not exist.
Traceback (most recent call last):
  File "d:\applications\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\applications\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Applications\Python37\Scripts\micropy.EXE\__main__.py", line 9, in <module>
  File "d:\applications\python37\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "d:\applications\python37\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "d:\applications\python37\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\applications\python37\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\applications\python37\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "d:\applications\python37\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "d:\applications\python37\lib\site-packages\micropy\cli.py", line 224, in create
    return mp.create_stubs(port, verbose=verbose)
  File "d:\applications\python37\lib\site-packages\micropy\main.py", line 83, in create_stubs
    stub_path = next(out_dir.iterdir())
StopIteration

After physically device disconnect-connect there is stub files visible on filesystem.
Main difference of this boards is internal fs exposed as USB mass storage device. Disabling USB MSD not solve this problem.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:24 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sfewingscommented, Nov 18, 2019

Thanks @BradenM, I’m currently using the ESP32 stubs which are indeed very similar. Thanks for all your effort with this development. The intellisense is fantastic.

0reactions
Josverlcommented, Apr 11, 2022

Interesting , How do you handle the issue that upydev depends on netifaces requires the VS C++ build tools to be installed ? does not that make the threshold to install too high ?

Building wheels for collected packages: netifaces
  Building wheel for netifaces (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'netifaces' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for netifaces
  Running setup.py clean for netifaces
Failed to build netifaces
Installing collected packages: netifaces, braceexpand, bleak-winrt, websocket-client, pyusb, Pygments, prompt-toolkit, dill, bleak, argcomplete, bleak-sigspec, upydevice, jupyter-micropython-upydevice, upydev
  Running setup.py install for netifaces ... error
  error: subprocess-exited-with-error

  × Running setup.py install for netifaces did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      running install
      running build
      running build_ext
      building 'netifaces' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Pyboard clone - MicroPython Forum (Archive)
The PyBoard is open source hardware, released under a CCbyA license. So it's perfectly legal for someone to take the design, fabricate boards ......
Read more >
TPYBoard - Chinese clone PYBoard
The board has a micro-USB port. When you plug that cable into your computer the PyBoard shows up as a USB drive with...
Read more >
MicroPython Basics: Load Files & Run Code - Digikey
This guide explores how to load files and run code on a MicroPython board. ... Note this guide was written for MicroPython.org firmware...
Read more >
MicroPython IDEs for ESP32 and ESP8266
This article shows a list of IDEs compatible with MicroPython that you can use to program your ESP32 and ESP8266 boards. Do you...
Read more >
Install ampy | MicroPython Basics: Load Files & Run Code
The examples in this guide are no longer supported and may not work. ... the cloned or extracted source and run the following...
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