Skip to content

${workspaceFolder} in python.defaultInterpreterPath reported unresolvable on startup #1316

@EnterTheNameHere

Description

@EnterTheNameHere

Problem

${workspaceFolder} in python.defaultInterpreterPath is reported as unresolvable, but interpreter is still discovered and used

Summary

After starting VS Code, the Python extension shows a bottom-right popup saying that the default interpreter path could not be resolved.

However, the configured interpreter is still successfully discovered, selected, and used. Python execution and pytest work normally.

This looks like an incorrect resolution failure for python.defaultInterpreterPath when it contains ${workspaceFolder}.

Settings

.vscode/settings.json

{
    "python.defaultInterpreterPath": "${workspaceFolder}/python-embedded/python.exe",
    "python.testing.pytestEnabled": true,
    "python.useEnvironmentsExtension": true,
    "python.testing.pytestArgs": ["tests"]
}

Current Behaviour

VS Code shows this popup on startup:

Default interpreter path '${workspaceFolder}/python-embedded/python.exe' could not be resolved: Could not resolve interpreter path '${workspaceFolder}/python-embedded/python.exe'

Despite that popup:

  • the interpreter is discovered successfully
  • the interpreter is selected successfully
  • Python execution works
  • pytest works

Expected behaviour

If ${workspaceFolder}/python-embedded/python.exe is valid for the opened workspace, it should resolve without warning, and no popup should be shown.

Important clue from logs

The logs show that the interpreter is correctly discovered and resolved as:
w:\Projects\Turnix\wip\python-embedded\python.exe

But later there is also an attempt to resolve this literal/unexpanded path:
W:\\Tools\\VSCode\\${workspaceFolder}/python-embedded/python.exe

This suggests that in at least one code path, ${workspaceFolder} is not being expanded before resolution, or is being resolved in the wrong scope/context.

Python Environments output

Relevant lines:

2026-03-04 18:29:40.484 [info] Discovered env: w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:40.484 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
...
2026-03-04 18:29:43.166 [info] [interpreterSelection] wip: defaultInterpreterPath: 3.12.10.final.0 (source: defaultInterpreterPath)
...
2026-03-04 18:29:43.175 [error] [pet] Failed to execute Python to resolve info "W:\\Tools\\VSCode\\${workspaceFolder}/python-embedded/python.exe": Systém nemůže nalézt uvedenou cestu. (os error 3)
2026-03-04 18:29:43.175 [warn] [pet::resolve] Unknown Python Env "${workspaceFolder}/python-embedded/python.exe"
2026-03-04 18:29:43.179 [warning] [priorityChain:global] defaultInterpreterPath '${workspaceFolder}/python-embedded/python.exe' unresolvable, falling back to auto-discovery
2026-03-04 18:29:43.587 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe

Notes

The issue seems specifically related to ${workspaceFolder} expansion, not to interpreter discovery itself.

The extension does successfully find and use the intended interpreter, but still reports the configured path as unresolved.

It may also be relevant that the warning mentions:
[priorityChain:global]

which could indicate that a workspace-scoped variable is being evaluated in a global resolution path.

Full Python Environments Output

2026-03-04 18:29:40.383 [info] Python-envs extension version: 1.20.1
2026-03-04 18:29:40.383 [info]
=== Python Envs Configuration Levels ===
2026-03-04 18:29:40.383 [info] {
"section": "Python Envs Configuration Levels",
"defaultEnvManager": {
"workspaceFolderValue": "undefined",
"workspaceValue": "undefined",
"globalValue": "undefined",
"defaultValue": "ms-python.python:venv"
},
"defaultPackageManager": {
"workspaceFolderValue": "undefined",
"workspaceValue": "undefined",
"globalValue": "undefined",
"defaultValue": "ms-python.python:pip"
}
}
2026-03-04 18:29:40.385 [info] [pet] Starting Python Locator c:\Users\Enter.vscode\extensions\ms-python.vscode-python-envs-1.20.1-win32-x64\python-env-tools\bin\pet.exe server
2026-03-04 18:29:40.385 [info] [pet] configure: Sending configuration update: {"workspaceDirectories":["w:\Projects\Turnix\wip"],"environmentDirectories":["w:/Projects/Turnix/wip/**/.venv"],"pipenvExecutable":"pipenv","poetryExecutable":"poetry","cacheDirectory":"c:\Users\Enter\AppData\Roaming\Code\User\globalStorage\ms-python.vscode-python-envs\pythonLocator"}
2026-03-04 18:29:40.400 [error] [pet] �[2m 0.031592900s�[0m �[33m WARN�[0m �[2mpet_windows_registry::environments�[0m�[2m:�[0m Failed to open HKLM\Software\Python, Os { code: 2, kind: NotFound, message: "Systém nemůže nalézt uvedený soubor." }

2026-03-04 18:29:40.457 [error] [pet] �[2m 0.089151200s�[0m �[33m WARN�[0m �[2mpet_windows_registry::environments�[0m�[2m:�[0m Failed to open HKLM\Software\Python, Os { code: 2, kind: NotFound, message: "Systém nemůže nalézt uvedený soubor." }

2026-03-04 18:29:40.484 [info] Discovered env: w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:40.484 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:40.489 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:40.494 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:40.502 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:40.508 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:40.514 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:40.535 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:40.945 [error] [pet] �[2m 0.202681700s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Python Execution for "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python.exe" produced an output "" without a separator
�[2m 0.202716800s�[0m �[33m WARN�[0m �[2mpet::find�[0m�[2m:�[0m Unknown Python Env "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python.exe"
�[2m 0.290870700s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Python Execution for "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python3.exe" produced an output "" without a separator
�[2m 0.290889700s�[0m �[33m WARN�[0m �[2mpet::find�[0m�[2m:�[0m Unknown Python Env "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python3.exe"

2026-03-04 18:29:41.756 [info] [pet] Telemetry: {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":202,"breakdown":{"GlobalVirtualEnvs":2,"Locators":57,"Path":201,"Workspaces":28},"locators":{"Conda":56,"PipEnv":1,"Pixi":0,"Poetry":1,"PyEnv":0,"Uv":0,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0,"WinPython":9,"WindowsRegistry":0,"WindowsStore":0}}}}
2026-03-04 18:29:41.758 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:41.969 [error] [pet] �[2m 1.390742700s�[0m �[33m WARN�[0m �[2mpet_windows_registry::environments�[0m�[2m:�[0m Failed to open HKLM\Software\Python, Os { code: 2, kind: NotFound, message: "Systém nemůže nalézt uvedený soubor." }
�[2m 1.499010900s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Python Execution for "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python.exe" produced an output "" without a separator
�[2m 1.499031700s�[0m �[33m WARN�[0m �[2mpet::find�[0m�[2m:�[0m Unknown Python Env "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python.exe"
�[2m 1.599806800s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Python Execution for "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python3.exe" produced an output "" without a separator
�[2m 1.599827100s�[0m �[33m WARN�[0m �[2mpet::find�[0m�[2m:�[0m Unknown Python Env "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python3.exe"

2026-03-04 18:29:42.005 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:42.021 [info] Discovered env: w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:42.022 [info] Python API: Changed environment from undefined to Python 3.12.10 for: w:\Projects\Turnix\wip
2026-03-04 18:29:42.022 [info] Internal: Changed environment from undefined to Python 3.12.10 for: w:\Projects\Turnix\wip
2026-03-04 18:29:42.042 [info] Conda not found, turning off conda features. [Error: Conda not found
at F (c:\Users\Enter.vscode\extensions\ms-python.vscode-python-envs-1.20.1-win32-x64\dist\extension.js:2:578361)
at runNextTicks (node:internal/process/task_queues:65:5)
at process.processImmediate (node:internal/timers:453:9)
at async L (c:\Users\Enter.vscode\extensions\ms-python.vscode-python-envs-1.20.1-win32-x64\dist\extension.js:2:578486)
at async t.registerCondaFeatures (c:\Users\Enter.vscode\extensions\ms-python.vscode-python-envs-1.20.1-win32-x64\dist\extension.js:2:596321)
at async Promise.all (index 1)
at async Immediate. (c:\Users\Enter.vscode\extensions\ms-python.vscode-python-envs-1.20.1-win32-x64\dist\extension.js:2:717155)]
2026-03-04 18:29:42.049 [info] [pet] Telemetry: {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":209,"breakdown":{"GlobalVirtualEnvs":4,"Locators":72,"Path":208,"Workspaces":18},"locators":{"Conda":71,"PipEnv":1,"Pixi":0,"Poetry":2,"PyEnv":0,"Uv":0,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0,"WinPython":12,"WindowsRegistry":0,"WindowsStore":0}}}}
2026-03-04 18:29:42.058 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:42.101 [error] [pet] �[2m 1.690255300s�[0m �[33m WARN�[0m �[2mpet_windows_registry::environments�[0m�[2m:�[0m Failed to open HKLM\Software\Python, Os { code: 2, kind: NotFound, message: "Systém nemůže nalézt uvedený soubor." }

2026-03-04 18:29:42.106 [info] Discovered env: w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:42.308 [error] [pet] �[2m 1.789776000s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Python Execution for "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python.exe" produced an output "" without a separator
�[2m 1.789807100s�[0m �[33m WARN�[0m �[2mpet::find�[0m�[2m:�[0m Unknown Python Env "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python.exe"
�[2m 1.878389600s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Python Execution for "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python3.exe" produced an output "" without a separator
�[2m 1.878407100s�[0m �[33m WARN�[0m �[2mpet::find�[0m�[2m:�[0m Unknown Python Env "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python3.exe"

2026-03-04 18:29:42.336 [info] Pyenv not found, turning off pyenv features.
2026-03-04 18:29:42.356 [info] [pet] Telemetry: {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":188,"breakdown":{"GlobalVirtualEnvs":2,"Locators":57,"Path":188,"Workspaces":10},"locators":{"Conda":56,"PipEnv":1,"Pixi":0,"Poetry":1,"PyEnv":0,"Uv":0,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0,"WinPython":10,"WindowsRegistry":0,"WindowsStore":0}}}}
2026-03-04 18:29:42.361 [error] [pet] �[2m 1.991130500s�[0m �[33m WARN�[0m �[2mpet_windows_registry::environments�[0m�[2m:�[0m Failed to open HKLM\Software\Python, Os { code: 2, kind: NotFound, message: "Systém nemůže nalézt uvedený soubor." }

2026-03-04 18:29:42.377 [info] Discovered env: w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:42.626 [error] [pet] �[2m 2.109153800s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Python Execution for "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python.exe" produced an output "" without a separator
�[2m 2.109175200s�[0m �[33m WARN�[0m �[2mpet::find�[0m�[2m:�[0m Unknown Python Env "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python.exe"
�[2m 2.193725000s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Python Execution for "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python3.exe" produced an output "" without a separator
�[2m 2.193743700s�[0m �[33m WARN�[0m �[2mpet::find�[0m�[2m:�[0m Unknown Python Env "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python3.exe"

2026-03-04 18:29:42.668 [info] Pipenv not found
2026-03-04 18:29:42.668 [info] Pipenv not found, turning off pipenv features. If you have pipenv installed in a non-standard location, set the "python.pipenvPath" setting.
2026-03-04 18:29:42.691 [info] [pet] Telemetry: {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":203,"breakdown":{"GlobalVirtualEnvs":3,"Locators":73,"Path":203,"Workspaces":13},"locators":{"Conda":72,"PipEnv":1,"Pixi":0,"Poetry":1,"PyEnv":0,"Uv":0,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0,"WinPython":12,"WindowsRegistry":0,"WindowsStore":0}}}}
2026-03-04 18:29:42.711 [error] [pet] �[2m 2.328856000s�[0m �[33m WARN�[0m �[2mpet_windows_registry::environments�[0m�[2m:�[0m Failed to open HKLM\Software\Python, Os { code: 2, kind: NotFound, message: "Systém nemůže nalézt uvedený soubor." }

2026-03-04 18:29:42.714 [info] Discovered env: w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:42.823 [error] [pet] �[2m 2.453881800s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Python Execution for "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python.exe" produced an output "" without a separator
�[2m 2.453911200s�[0m �[33m WARN�[0m �[2mpet::find�[0m�[2m:�[0m Unknown Python Env "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python.exe"

2026-03-04 18:29:42.916 [error] [pet] �[2m 2.547303200s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Python Execution for "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python3.exe" produced an output "" without a separator
�[2m 2.547329100s�[0m �[33m WARN�[0m �[2mpet::find�[0m�[2m:�[0m Unknown Python Env "\\?\C:\Users\Enter\AppData\Local\Microsoft\WindowsApps\python3.exe"

2026-03-04 18:29:42.916 [info] Poetry not found, turning off poetry features.
2026-03-04 18:29:42.917 [info] [interpreterSelection] Applying initial environment selection for 1 workspace folder(s)
2026-03-04 18:29:42.917 [info] [pet] Telemetry: {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":219,"breakdown":{"GlobalVirtualEnvs":4,"Locators":69,"Path":218,"Workspaces":13},"locators":{"Conda":68,"PipEnv":1,"Pixi":0,"Poetry":1,"PyEnv":0,"Uv":0,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0,"WinPython":10,"WindowsRegistry":0,"WindowsStore":0}}}}
2026-03-04 18:29:42.928 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:42.963 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:43.158 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:43.166 [info] [interpreterSelection] wip: defaultInterpreterPath: 3.12.10.final.0 (source: defaultInterpreterPath)
2026-03-04 18:29:43.167 [info] Python API: Changed environment from Python 3.12.10 to defaultInterpreterPath: 3.12.10.final.0 for: w:\Projects\Turnix\wip
2026-03-04 18:29:43.167 [info] Internal: Changed environment from Python 3.12.10 to defaultInterpreterPath: 3.12.10.final.0 for: w:\Projects\Turnix\wip
2026-03-04 18:29:43.175 [error] [pet] �[2m 2.802801800s�[0m �[31mERROR�[0m �[2mpet_python_utils::env�[0m�[2m:�[0m Failed to execute Python to resolve info "W:\Tools\VSCode\${workspaceFolder}/python-embedded/python.exe": Systém nemůže nalézt uvedenou cestu. (os error 3)
�[2m 2.802824900s�[0m �[33m WARN�[0m �[2mpet::resolve�[0m�[2m:�[0m Unknown Python Env "${workspaceFolder}/python-embedded/python.exe"
�[2m 2.802829600s�[0m �[31mERROR�[0m �[2mpet::jsonrpc�[0m�[2m:�[0m Failed to resolve env "${workspaceFolder}/python-embedded/python.exe"

2026-03-04 18:29:43.175 [info] Python API: Changed environment from defaultInterpreterPath: 3.12.10.final.0 to Python 3.12.10 for: w:\Projects\Turnix\wip
2026-03-04 18:29:43.175 [info] Internal: Changed environment from defaultInterpreterPath: 3.12.10.final.0 to Python 3.12.10 for: w:\Projects\Turnix\wip
2026-03-04 18:29:43.176 [info] Python API: Changed environment from undefined to Python 3.12.10 for: global
2026-03-04 18:29:43.176 [info] Internal: Changed environment from undefined to Python 3.12.10 for: global
2026-03-04 18:29:43.179 [warning] [priorityChain:global] defaultInterpreterPath '${workspaceFolder}/python-embedded/python.exe' unresolvable, falling back to auto-discovery
2026-03-04 18:29:43.188 [info] [interpreterSelection] global: none (source: autoDiscovery)
2026-03-04 18:29:43.587 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:43.591 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:43.598 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:43.601 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:43.607 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe
2026-03-04 18:29:43.611 [info] Resolved Python Environment w:\Projects\Turnix\wip\python-embedded\python.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions