Repository navigation
Activating extension 'ms-python.vscode-python-envs' failed: The "paths[1]" argument must be of type string. Received undefined. #951
Description
Activity
Thank you for the comprehensive issue and Im sorry you are facing this problem. I will take a look!
Hello! Taking a look at this now, I haven't seen anything like this so bear with me as I have a few questions to narrow it down:
- what are versions do you have for the python and python environments extension? does upgrading to the latest pre-release of both change anything?
- Does anything happen if you uninstall then reinstall the python environments extension?
- What is your workspace setup? If you open a blank folder you see this problem still?
- What do you have installed on your machine in terms of python environments and executables? Conda ? different python versions?
- Can you check if you have any settings (at the workspace or user level) defined that related to python paths? Maybe
defaultInterpreterPath,venvFolders,venvPath,condaPathor anything similar to these.
Thanks and hopefully we can get this figured out
- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Oct 23, 2025 DesenbergChina commented
on Oct 24, 2025 AuthorMore actionsThank you for your reply! The more infomation will be as follows:
- upgrading to the latest pre-release doesn't change anything. Now their versions are : ms-python.python
2025.16.0ms-python.vscode-python-envs:1.10.0 - uninstalling then reinstall the python environments extension is useless.
- My workspace setup is default, and I haven't modified it. if I open a blank folder and then new .py file, this bug still happen.
python 3.13.7andpython 3.10.11are python versions on my machine. No Conda or others.- command 'python-envs.set' not found will appear, when I want to set the python interpreter path.
defaultInterpreterPathis D:\APP\Python3\python.exe. I don't think there's any problem.
- upgrading to the latest pre-release doesn't change anything. Now their versions are : ms-python.python
- removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Oct 24, 2025 Hm very interesting. First can you try running "Python: Run Python Environment Tool (PET) in Terminal..." and select "find" does that work and what does it output? Also if you un-install the python environments extension does this error message disappear?
- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Oct 28, 2025 DesenbergChina commented
on Oct 29, 2025 AuthorMore actions- removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Oct 29, 2025 So does it no longer happen at all if you uninstall and re-install or does it re-appear?
- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Oct 29, 2025 Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.
Happy Coding!
DesenbergChina commented
on Nov 13, 2025 AuthorMore actionsif i uninstall and re-install , and then it re-appear
- removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Nov 13, 2025 I think I had the same issue and was able to sort it out.
In settings.json there's a key
"python-envs.pythonProjects". For me this key was set to a list with a single empty object in it. I put some value in this object and restarted the extensions and now everything works.Hope it helps Desenberg (@DesenbergChina) (if you're still experiencing this) and hope it helps Eleanor Boyd (@eleanorjboyd) and team handle this better for everyone.
Reacted by Kevin Overmanaha great find Noam Nelke (@noamnelke)! Let me get in a fix to catch that error.
Reacted by Noam Nelke- addedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
on Jan 5, 2026 DesenbergChina commented
on Jan 12, 2026 AuthorMore actionsThanks. Now I have solved the problem by deleting cache and files of this extension completely(all of related files) and re-install, this problem disappeared. I found that simply uninstalling the extension within VSCode doesn't actually remove all the related files and folders
Reacted by Eleanor Boyd- locked as resolved and limited conversation to collaborators
on Apr 26, 2026

As shown in the question, I have been encountering this problem since several versions ago.
As long as I am using the Python extension plugin , at the same time, enable vscode python environments .The error will be as follows:
Extension activation failed, run the 'Developer: Toggle Developer Tools' command for more information.
The specific error information is displayed in Developer Tools as follows, and the complete error information is provided in the attachment.
log.docx
log.ts:440 INFO Started local extension host with pid 10308.
log.ts:440 INFO MCP Registry configured: https://api.mcp.github.com/2025-09-15
log.ts:440 INFO Settings Sync: Account status changed from uninitialized to available
mainThreadExtensionService.ts:107 Activating extension 'ms-python.vscode-python-envs' failed: The "paths[1]" argument must be of type string. Received undefined.
$onExtensionActivationError @ mainThreadExtensionService.ts:107
notificationsAlerts.ts:42 Extension activation failed, run the 'Developer: Toggle Developer Tools' command for more information.
c @ notificationsAlerts.ts:42
mainThreadExtensionService.ts:107 Activating extension 'ms-python.python' failed: Activating extension 'ms-python.vscode-python-envs' failed: The "paths[1]" argument must be of type string. Received undefined..
$onExtensionActivationError @ mainThreadExtensionService.ts:107
log.ts:440 INFO [perf] Render performance baseline is 15ms
log.ts:460 ERR [Extension Host] (node:10308) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use
Code --trace-warnings ...to show where the warning was created)error @ log.ts:460
console.ts:137 [Extension Host] (node:10308) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use
Code --trace-warnings ...to show where the warning was created)gbs @ console.ts:137
log.ts:460 ERR chatParticipant must be declared in package.json: claude-code
error @ log.ts:460
webviewElement.ts:489 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
mountTo @ webviewElement.ts:489
notificationsAlerts.ts:42 command 'python-envs.set' not found
c @ notificationsAlerts.ts:42
webviewElement.ts:489 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
mountTo @ webviewElement.ts:489
webviewElement.ts:489 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
mountTo @ webviewElement.ts:489
I don't know what's going on, even though I searched for a lot of information online, I couldn't solve it. Please give me some help, thank you very much!