Repository navigation
Extension v2024.4.0 and v2024.4.1 create indefinite "Discover Python Interpreters" #23452
Description
Activity
- addedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on May 20, 2024 Hi Leo Pimentel (@dokutoshi). Thank you for filing the issue. Can you set your log level to trace in command palette and share your Python output info accessible in output for Python?

- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on May 20, 2024 Interesting..Does
Clear Cache and reload Python extensionfix the problem?
(Accessible via ctrl+shift+p) or cmd+shift+p on mac.Also wondering if problem persists in version below v2024.4.0
- I will look into this later today. Prescriptive measure include setting log level == 'trace' and cmd+shift+p On May 22, 2024, at 14:49, Anthony Kim ***@***.***> wrote: Also wondering if problem persists in version below v2024.4.0 — Reply to this email directly, view it on GitHub<#23452 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACNWBJOTDMYMQLMVSSOMG6TZDTSCVAVCNFSM6AAAAABH63ATVOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVGUZDMNRRGI>. You are receiving this because you were mentioned.Message ID: ***@***.***> This email and any attachments may contain private, confidential and privileged material for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and delete this email and any attachments afterwards.
- removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Jun 1, 2024 Clearing the cache and reloading the window does solve the infinite running issue.
However, the reason i opened this ticket relates to this bug:
48 hours into testing,
Discovering process starts up and terminates a running job. ML training takes weeks. What happened? Using VSCode worked for over 2 years in DL training. Now I can barely use it for a day withoutDiscovering Python Interpreters appearing and halting training. Anthony Kim (@anthonykim1)Leo Pimentel (@dokutoshi) Can you bring the requested logs and also check if same problem exists in version below 2024.4.0 that you have mentioned?
- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Jun 4, 2024 Dealing with a related issue in Vscode Insiders that crashes Pylance and triggers Discovering Python Interpreters.
note the error using the-Iflag in the Vscode code base.
Pylance CrashFor reference, here is the Python log output.
2024-06-04 18:31:35.095 [info] shell: bash
2024-06-04 18:31:35.732 [info] > /usr/bin/python -I ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py
2024-06-04 18:31:35.802 [info] > ./miniforge-pypy3/envs/tf_2.15/bin/python -I ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py2024-06-04 18:31:35.816 [warning] [Error: Command failed: /usr/bin/python -I /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py
Unknown option: -I
usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.at ChildProcess.exithandler (node:child_process:423:12) at ChildProcess.emit (node:events:530:35) at maybeClose (node:internal/child_process:1105:16) at Socket.<anonymous> (node:internal/child_process:457:11) at Socket.emit (node:events:518:28) at Pipe.<anonymous> (node:net:337:12)] {code: 2,
killed: false,
signal: null,
cmd: '/usr/bin/python -I /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py /home/ec2-user/.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py'
}
2024-06-04 18:31:35.816 [error] Support for Python 2.7 has been dropped by the Python extension so certain features may not work, upgrade to using Python 3.
2024-06-04 18:31:35.843 [info] > /usr/bin/python ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py
2024-06-04 18:31:36.115 [info] > ./miniforge-pypy3/bin/python -I ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py
2024-06-04 18:31:36.279 [info] > /usr/local/bin/python -I ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/get_output_via_markers.py ./.vscode-server-insiders/extensions/ms-python.python-2024.6.0/python_files/interpreterInfo.py
2024-06-04 18:31:36.554 [info] Starting Pylance language server.- removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Jun 4, 2024 26 remaining items
Leo Pimentel (@dokutoshi) For long term we are going to switch to a different mechanism for discovery and one of the things we are seeing there is providing a way to exclude certain directories, in addition to improving the search performance.
Karthik Nadig (@karthiknadig) that would be most excellent. From a corporate perspective, the current limitation created the following situation:
- Migrate all AWS Linux 2 servers to Ubuntu as Linux 2 contains a python 2.7 env, albeit unused.
- Load only the source directory. Exclude Directories such as TF folders, parquet and csv data source, and other meta libraries from the workspace. In addition, data folders were included.
These are significant changes at a corporate level . Ubuntu brings its own inherent limitations non-XFS etc that required further steps to support ML workflows.
the bot closed the open ticket after 3 days - that is too short a window - please adjust the bot.
Python Uncaught Error 2024.2.1](#23554 (comment))
Clearing the cache with each reload is standard practice.
One important test scenario:
Karthik Nadig (@karthiknadig) Don Jayamanne (@DonJayamanne)
I extended the workspace using "Add Folder to Workspace" to include a functional folder for TensorFlow.
For clarification:
The first folder contains Python source files and a notebook (a static folder).
The second folder (the TensorFlow folder) contains logs and metadata files generated by TensorFlow during training, typically per epoch, to save model weights and biases (a dynamic folder). PyTorch has a similar on-training file creation.
Post-observations after including a dynamic folder show that the growth in file count (less than 10 files) during an active kernel leads to a kernel halt. This is different, in my opinion, from including a large data directory with millions of images. In the dynamic folder case, behavior suggests that files added/created in an active workspace trigger the Python discovery process, interrupting an active kernel.
Best,
Leo
- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Dec 9, 2024 - addedarea-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsand removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Dec 9, 2024 - addedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
on Dec 19, 2024 Closing since there was no response for about a year. Feel free to ping me if occurs again. Thanks
I am m seeing a very similar issue on Windows 11 with VS Code v1.125: simply opening a non-Python single file, such as a markdown file, triggers “Discovering Python Interpreters”. Disabling/uninstalling the Python extension stops the behavior.
This seems related to previously closed reports:




Type: Bug
Behaviour
Expected vs. Actual
Install v2024.4.0 or v2024.4.1 extension and the discovering Python interpreters run indefinitely. This also restarts the kernel periodically - a MAJOR PROBLEM when excecuting ML notebooks - lost variables imply retraining or reloading a pandas DF etc.
XXX
Steps to reproduce:
To stop the kernel from periodic restarts use v2024.2.1
Diagnostic data
python.languageServersetting: PylanceOutput for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)User Settings
Extension version: 2024.2.1
VS Code version: Code 1.88.0 (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:28:09.495Z)
OS version: Darwin arm64 23.5.0
Modes:
System Info
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
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments