BradenM / micropy-cli

Micropython Project Management Tool with VSCode support, Linting, Intellisense, Dependency Management, and more!
https://micropy-cli.readthedocs.io
MIT License
313 stars 25 forks source link

Why does it show a stub installed but then throw error #235

Closed ilium007 closed 3 years ago

ilium007 commented 3 years ago

I am trying to test and installed the 'micropython' stub but when I then try to init a project it says no stubs installed

(micropython) micropython % micropy stubs add micropython                                                                                                                                       0:02:02

MicroPy  Adding micropython to stubs

MicroPy  Resolving stub...
MicroPy  micropython: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| [43.4k/43.4k @ 530MB/s]
(micropython) micropython %                                                                                                                                                                     0:02:08
(micropython) micropython %                                                                                                                                                                     0:02:11
(micropython) micropython % micropy init test1                                                                                                                                                  0:02:11

MicroPy  Creating New Project
? Choose any Templates to Generate done (4 selections)
MicroPy  You don't have any stubs!

MicroPy  To add stubs to micropy, use micropy stubs add <STUB_NAME>
(micropython) micropython %
ilium007 commented 3 years ago

Verified I have a stub in ~/.micropy/stubs

(micropython) micropython % micropy init test1                                                                                                                                                 23:14:41

MicroPy  Creating New Project
? Choose any Templates to Generate done (4 selections)
MicroPy  You don't have any stubs!

MicroPy  To add stubs to micropy, use micropy stubs add <STUB_NAME>
(micropython) micropython % ll ~/.micropy/stubs                                                                                                                                                23:14:57
drwxrwxr-x - xxxx  7 Sep  2020 BradenM-micropy-stubs-e1b8ce6
(micropython) micropython %
BradenM commented 3 years ago

@ilium007 Sorry for my late reply.

This is actually a design error. You installed the micropython stub, which is a "firmware" stub. Firmware stubs are more akin to dependencies rather than something micropy-cli uses to scaffold out a project.

You need to install a "device" stub (such as esp32-micropython-X.XX.X).

Thanks for pointing this out.

BradenM commented 2 years ago

Pinning this for visibility until it is fixed in v4.0.0