-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
micropy
throws TypeError
when no templates are selected during project init.
#338
Comments
Hi @guineau, thanks for the report. After created a few dummy projects with different variations, I was able to recreate your error. It seems to happen when no templates are selected during the Can you confirm that you did not select any templates? If so, a workaround for now would be to manually add --- /tmp/bad/micropy.json 2022-11-21 18:02:25.417349824 -0600
+++ /tmp/good/micropy.json 2022-11-21 18:02:37.960437026 -0600
@@ -6,5 +6,7 @@
"dev-packages": {
"micropy-cli": "*"
},
- "packages": {}
+ "packages": {},
+ "config": {}
} If it was not your intention to not select any templates, you may remove the |
micropy
throws TypeError
when no templates are selected during project init.
Hi Braden,
I am new to micropy (and MicroPython!) so I probably just set things up incorrectly.
Ok, I just deleted the project and started again - and I totally missed the part about "press space to select" when picking templates. Much better now that I selected something :)
Sorry for confusion and thank you for a great utility!
You can close this bug report (or should I?)
john
… On Nov 21, 2022, at 4:06 PM, Braden Mars ***@***.***> wrote:
Hi @guineau <https://github.com/guineau>, thanks for the report.
After created a few dummy projects with different variations, I was able to recreate your error.
It seems to happen when no templates are selected during the micropy init process. This currently results in an (incorrect) micropy.json file that lacks a config key entirely, instead of a config key with an empty object as its value.
Can you confirm that you did not select any templates?
If so, a workaround for now would be to manually add "config": {} to your micropy.json file. This should resolve the issue until I can implement a proper fix in the next release.
--- /tmp/bad/micropy.json 2022-11-21 18:02:25.417349824 -0600
+++ /tmp/good/micropy.json 2022-11-21 18:02:37.960437026 -0600
@@ -6,5 +6,7 @@
"dev-packages": {
"micropy-cli": "*"
},
- "packages": {}
+ "packages": {},
+ "config": {}
}
If it was not your intention to not select any templates, you may remove the .micropy/ and micropy.json files and rerun the micropy init command.
—
Reply to this email directly, view it on GitHub <#338 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AE4LV6US6DLKU34ZEB5PA3LWJQFBBANCNFSM6AAAAAAR6QOQOA>.
You are receiving this because you were mentioned.
|
No worries! Best to just leave this issue open for now, as it is a legitimate bug for micropy to crash in the scenario that no templates were selected. Glad that you have a working setup now though, and best of luck on your project(s)! |
Additionally resolve some known issues and make minor improvements. Fixed #338 Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
Additionally resolve some known issues and make minor improvements. Fixed #338 Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
macOS Ventura on M1 MacBook.
micropy, version 4.0.0rc2
Python 3.9.13
VSCode Version: 1.73.1
Installed micropy and ran:
Both of which worked fine.
However when I run micropy now I always get the following stack dump.
The text was updated successfully, but these errors were encountered: