Skip to content

Python Extension fails to run scripts due to AppLocker + Native Locator + pet.exe spawn error after auto-update to v2025.10.1 #25318

@nilbest

Description

@nilbest

Type: Bug

Behaviour

After the Python extension auto-updated to v2025.10.1, running Python scripts via the ▶️ Run Python File button stopped working.
Nothing happens when clicking the button.

The extension logs (Python Environments) show:

[info] Starting Python Locator c:\Users\XXXXX\.vscode\extensions\ms-python.python-2025.10.1-win32-x64\python-env-tools\bin\pet.exe server  
[error] Error starting Python Finder ... A system error occurred (spawn UNKNOWN)

The extension also enters an infinite loop trying to locate virtual environments.

Image Infinite Loop on Statusbar

Changing the Python: Environment Locator setting from Native to JavaScript (js) did not resolve the issue in this version.

Steps to reproduce:

  1. Use VS Code with Python extension v2025.10.1
  2. Set the environment locator to Native
  3. Try to run a Python script using the play button

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

2025-07-23 13:55:34.152 [info] > pyenv which python
2025-07-23 13:55:34.152 [info] cwd: .
2025-07-23 13:55:34.174 [info] > conda info --json

Output for Python Environments in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python Environments)

[info] Starting Python Locator c:\Users\XXXXX\.vscode\extensions\ms-python.python-2025.10.1-win32-x64\python-env-tools\bin\pet.exe server  
[error] Error starting Python Finder ... A system error occurred (spawn UNKNOWN)

📄 Context

This issue started after the Python extension auto-updated to v2025.10.1. From that point on, the extension appeared to enter an infinite loop trying to locate virtual environments.

Changing the python.experiments.optInto or python.experiments.enabled settings had no effect.
Also, switching the Python: Environment Locator setting from Native to JavaScript (js) did not resolve the issue in this version.

Image Overview infinite Loop

✅ Workaround

I was able to resolve the issue by:

  1. Manually downgrading the Python extension to version v2025.10.0

  2. Then switching the Environment Locator setting from Native to JavaScript (js)

Image Fix Locator

After this, the play button worked again as expected and it fixed the infinite search loop.

Image Overview fixed

Diagnostic data

Extension version: 2025.10.1
VS Code version: Code 1.102.1 (7adae6a56e34cb64d08899664b814cf620465925, 2025-07-15T16:41:17.147Z)
OS version: Windows_NT x64 10.0.26100
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.13.5
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Default

User Settings


languageServer: "Pylance"

Installed Extensions
Extension Name Extension Id Version
debugpy ms- 2025.10.0
js-debug ms- 1.102.0
js-debug-companion ms- 1.1.3
jupyter ms- 2025.6.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.3.0
python ms- 2025.10.0
vscode-js-profile-table ms- 1.0.10
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
vscode-pylance ms- 2025.6.2
vscode-python-envs ms- 1.0.0
System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i5-1345U (12 x 2496)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.69GB (5.06GB free)
Process Argv C:\TechemTools\src\Battery_Project --crash-reporter-id fd5b8fa9-88a5-4ddc-85b3-81e4e9991702
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
h48ei257:31000450
nativeloc1:31344060
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
9064b325:31222308
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
c7cif404:31314491
pythonpulldiag:31343502
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
0aa6g176:31307128
747dc170:31275177
6518g693:31334701
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
9d2cg352:31346308
usemarketplace:31343026
nesew2to5:31336538
agentclaude:31350858
nes-diff-11:31337487
replacestringexc:31350595
nes-set-on:31351930
6abeh943:31336334
envsactivate1:31352070
yijiwantestdri0626-t:31336930
0927b901:31350571
ji9b5146:31348712
0cj2b977:31352657

Metadata

Metadata

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions