After updating VS code to v1.92, the Python extension consistently fails to launch, indefinitely showing a spinner next to “Reactivating terminals…” on the status bar.
Selecting OUTPUT > Python
reveals the error Failed to resolve env "/mnt/data-linux/miniconda3"
.
Here’s the error trace:
2024-08-07 18:35:35.873 [error] sendStartupTelemetry() failed. s [Error]: Failed to resolve env "/mnt/data-linux/miniconda3"
at ae (/home/user/.vscode-insiders/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1968174)
at oe (/home/user/.vscode-insiders/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1966134)
at Immediate.<anonymous> (/home/user/.vscode-insiders/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:1962428)
at processImmediate (node:internal/timers:478:21) {
code: -4,
data: undefined
}
How do I fix this? Restarting worked, but that’s not sustainable.
2
Answers
Update: The latest pre-release has likely fixed the issue (at least for me) - so possibly there's now another workaround in addition to the below.
This appears to be a bug related to the new "native" Python locator - I think VS Code recently switched more people from the old to the new locator.
You can go back to the old working version by adding the following line to the user settings JSON (until the bug in the native locator is fixed):
There are already plenty of Github issues, hopefully a fix is on its way:
These steps solved my issue:
Settings
Python Locator
native
tojs
.