Skip to content
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

Cannot "Switch Stubs". Incorrect command-line quoting? #252

Closed
ziesemer opened this issue Sep 16, 2024 · 1 comment
Closed

Cannot "Switch Stubs". Incorrect command-line quoting? #252

ziesemer opened this issue Sep 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ziesemer
Copy link

Please provide a clear and concise description of the bug along with logs

It has been over a year since I've touched MicroPico, so not all sure what has changed since then. However, even opening a prior project from then, or with a new project I'm attempting from scratch, I'm getting errors about import machine for a MicroPython project from Pylint - though this may just be a Pylint configuration issue.

Regardless - if I try the "Switch Stubs" command, I think "Included" is working? However, If I choose "RPi Pico" (or "W"), and any version, including the latest (1.2.3.0.post2) - I get the following:

2024-09-15 21:51:15.405 [error] Error: Command failed: &"C:\WINDOWS\py.EXE -m pip" install micropython-rp2-rpi_pico_w-stubs==1.23.0.post2 --target "C:\Users\mark/.micropico-stubs/micropython-rp2-rpi_pico_w-stubs==1.23.0.post2" --no-user
& : The term 'C:\WINDOWS\py.EXE -m pip' is not recognized as the name of a cmdlet, function, script file, or operable 
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:2
+ &"C:\WINDOWS\py.EXE -m pip" install micropython-rp2-rpi_pico_w-stubs= ...
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\WINDOWS\py.EXE -m pip:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 

	at genericNodeError (node:internal/errors:984:15)
	at wrappedFn (node:internal/errors:538:14)
	at checkExecSyncError (node:child_process:929:11)
	at Object.execSync (node:child_process:1001:15)
	at Object.execSync (node:electron/js2c/node_init:2:13164)
	at gd (c:\Users\mark\.vscode\extensions\paulober.pico-w-go-4.0.4-win32-x64\dist\extension.cjs:8:60968)
	at async c:\Users\mark\.vscode\extensions\paulober.pico-w-go-4.0.4-win32-x64\dist\extension.cjs:11:57387 micropico.extra.switchStubs {"value":"paulober.pico-w-go","_lower":"paulober.pico-w-go"}

I think C:\WINDOWS\py.EXE would be a valid command, but the -m pip needs to be treated as an argument, not part of the command executable. Possibly related to #215 ? Though that shows as fixed as of April, and included in #217 ?

Which version of MicroPico are you using?

[email protected]

Support info

Copy this from the Help -> Info/About -> Copy (Code -> About Visual Studio Code -> Copy on macOS) option in Visual Studio Code:

Version: 1.93.1 (user setup)
Commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
Date: 2024-09-11T17:20:05.685Z
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631
@ziesemer ziesemer added the bug Something isn't working label Sep 16, 2024
@paulober
Copy link
Owner

Sorry for the inconvenience. Just uploaded a patch to fix that issue, thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants