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.
This appears to be a bug related with 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):
"python.locator": "js",
There are already plenty of Github issues, hopefully a fix is on its way:
- https://github.com/microsoft/vscode-python/issues/23922
- https://github.com/microsoft/vscode-python/issues/23963
- https://github.com/microsoft/vscode-python/issues/23956