Closed bruno963852 closed 3 years ago
I have the same Issue on Windows 10
I have the same issue. Is there any workaround for this bug?
Running micropy
shows the errors posted above.
I downgraded my install to a version which seemed to work:
> pip install micropy-cli==3.1.1
Verify install:
> micropy --version
micropy, version 3.1.1
Now I can run:
> micropy
MicroPy Loading Project
MicroPy ✔ Ready!
MicroPy Update Available!
MicroPy Version v3.4.0 is now available
MicroPy You can update via: pip install --upgrade micropy-cli
Hey guys, sorry to see you guys are running into some issues.
I'm currently moving house, so I've been out of the loop for a bit, but as soon as I get situated I will see what I can do to help resolve this.
For now, I'd suggest following @Harvzor workaround (thanks by the way!).
Unfortunately, @Harvzor workaround doesn't help in all cases. Error message is slitely different but basically the same
`PS D:\Dropbox\Electronics\RT-Thread\test2> micropy init
MicroPy Update Available! MicroPy Version v3.4.0 is now available MicroPy You can update via: pip install --upgrade micropy-cli
MicroPy Creating New Project ? Project Name test2 ? Choose any Templates to Generate [VSCode Settings for Autocompletion/Intellisense] ? Which stubs would you like to use? [esp32-micropython-1.12.0]
MicroPy Initiating test2
Traceback (most recent call last):
File "d:\python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "d:\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Python36\Scripts\micropy.exe__main.py", line 7, in
Windows 10 Python 3.6.4 micropy-cli 3.1.1 VSCode 1.51.1
For latest version of micropy-cli (3.4.0) the message is
File "d:\python36\lib\site-packages\micropy\project\modules\stubs.py", line 132, in create return self.load() File "d:\python36\lib\site-packages\micropy\project\modules\stubs.py", line 120, in load self.config.upsert('stubs', {s.name: s.stub_version for s in self._stubs}) File "d:\python36\lib\site-packages\micropy\project\modules\stubs.py", line 120, in <dictcomp> self.config.upsert('stubs', {s.name: s.stub_version for s in self._stubs}) AttributeError: 'str' object has no attribute 'stub_version'
I also gave up (I'll be back though!) using micropy-cli
after hitting the same error as above. 😬
the error is due to a regression in a dependency (questionary), if you upgrade to version 1.8.1
it should be fixed (e.g. pip install questionary==1.8.1
)
@tmbo Oh wow, that was fast haha. Awesome, will update my PR to require v1.8.1
instead of <v1.8.0
.
Thanks again.
Okay, thanks for the patience guys, you should now be able to run pip install --upgrade micropy-cli
(micropy --version
should report v3.5.0
and no longer run into this issue.
Describe the bug When i run micropy init it crashes with the following error:
Logs
Context (Environment)