You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extension v2024.4.0 and v2024.4.1 create indefinite "Discover Python Interpreters" #23452
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 version (& distribution if applicable, e.g. Anaconda): 3.11.9
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
Value of the python.languageServer setting: Pylance
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
User Settings
languageServer: "Pylance"
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:
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?
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.
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 without Discovering Python Interpreters appearing and halting training. Anthony Kim (@anthonykim1)
Dealing with a related issue in Vscode Insiders that crashes Pylance and triggers Discovering Python Interpreters.
note the error using the -I flag in the Vscode code base. Pylance Crash
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.
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.
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.
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:
Activity
anthonykim1 commentedon 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?
dcx commentedon May 21, 2024
I'm having this issue too, and there's nothing available in the Output dialog.
anthonykim1 commentedon May 22, 2024
Interesting..Does
Clear Cache and reload Python extensionfix the problem?(Accessible via ctrl+shift+p) or cmd+shift+p on mac.
anthonykim1 commentedon May 22, 2024
Also wondering if problem persists in version below v2024.4.0
dokutoshi commentedon Jun 1, 2024
dokutoshi commentedon Jun 4, 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)anthonykim1 commentedon Jun 4, 2024
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?
dokutoshi commentedon 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 Crash
For 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.py
2024-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.
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.
dokutoshi commentedon Jun 4, 2024
Sorry venting here but when the Discovery process starts, it is impossible to save the file.
Even Save As fails silently!
26 remaining items
karthiknadig commentedon Jul 1, 2024
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.
dokutoshi commentedon Jul 1, 2024
Karthik Nadig (@karthiknadig) that would be most excellent. From a corporate perspective, the current limitation created the following situation:
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.
dokutoshi commentedon Jul 16, 2024
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
anthonykim1 commentedon Dec 9, 2024
Are you still able to repro this?

Also wondering if changing from native => js changes any behavior.
anthonykim1 commentedon Sep 9, 2025
Closing since there was no response for about a year. Feel free to ping me if occurs again. Thanks
amdokamal commentedon Jun 18, 2026
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: