Repository navigation
endless hanging on Discovering Python Interpreters #22702
Copy link
Copy link
Closed as not planned
Labels
triage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
Behaviour
Expected vs. Actual
load one python env vs. endless waiting
Steps to reproduce:
- just install the extension
Diagnostic data
- Python version (& distribution if applicable, e.g. Anaconda): 3.8.18
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
- Value of the
python.languageServersetting: Pylance
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
2023-12-28 15:50:05.806 [info] Experiment 'pythonRecommendTensorboardExt' is active
2023-12-28 15:50:05.807 [info] Experiment 'pythonREPLSmartSend' is active
2023-12-28 15:50:05.807 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2023-12-28 15:50:05.807 [info] Experiment 'pythonTestAdapter' is active
2023-12-28 15:50:05.807 [info] Default formatter is set to esbenp.prettier-vscode for workspace /remote-home/share/data/med_data
2023-12-28 15:50:05.807 [info] Test server listening.
2023-12-28 15:50:05.807 [error] Failed to initialize source map support in extension
2023-12-28 15:50:05.817 [info] > conda info --json
2023-12-28 15:50:05.850 [info] > /bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/interpreterInfo.py
2023-12-28 15:50:05.884 [error] [Error: Command failed: /bin/python -I /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/get_output_via_markers.py /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/interpreterInfo.py
/bin/sh: 1: /bin/python: not found
at ChildProcess.exithandler (node:child_process:420:12)
at ChildProcess.emit (node:events:525:35)
at maybeClose (node:internal/child_process:1091:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:513:28)
at Pipe.<anonymous> (node:net:322:12)] {
code: 127,
killed: false,
signal: null,
cmd: '/bin/python -I /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/get_output_via_markers.py /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/interpreterInfo.py'
}
2023-12-28 15:50:08.778 [info] > /bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/interpreterInfo.py
2023-12-28 15:50:08.781 [error] [Error: Command failed: /bin/python -I /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/get_output_via_markers.py /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/interpreterInfo.py
/bin/sh: 1: /bin/python: not found
at ChildProcess.exithandler (node:child_process:420:12)
at ChildProcess.emit (node:events:525:35)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5)] {
code: 127,
killed: false,
signal: null,
cmd: '/bin/python -I /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/get_output_via_markers.py /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/interpreterInfo.py'
}
2023-12-28 15:50:13.882 [info] > ~/anaconda3/envs/bdy/bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/interpreterInfo.py
2023-12-28 15:50:16.788 [info] Python interpreter path: ~/anaconda3/envs/bdy/bin/python
2023-12-28 15:53:12.080 [info] Experiment 'pythonRecommendTensorboardExtcf' is active
2023-12-28 15:53:12.080 [info] Experiment 'pythonREPLSmartSend' is active
2023-12-28 15:53:12.080 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2023-12-28 15:53:12.080 [info] Experiment 'pythonTestAdapter' is active
2023-12-28 15:53:12.129 [info] Default formatter is set to esbenp.prettier-vscode for workspace /remote-home/share/data/med_data
2023-12-28 15:53:12.672 [info] Test server listening.
2023-12-28 15:53:12.698 [error] Failed to initialize source map support in extension
2023-12-28 15:53:12.726 [info] > conda info --json
2023-12-28 15:53:12.869 [info] > /bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/interpreterInfo.py
2023-12-28 15:53:13.065 [error] [Error: Command failed: /bin/python -I /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/get_output_via_markers.py /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/interpreterInfo.py
/bin/sh: 1: /bin/python: not found
at ChildProcess.exithandler (node:child_process:420:12)
at ChildProcess.emit (node:events:525:35)
at maybeClose (node:internal/child_process:1091:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:513:28)
at Pipe.<anonymous> (node:net:322:12)] {
code: 127,
killed: false,
signal: null,
cmd: '/bin/python -I /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/get_output_via_markers.py /remote-home/jqdai/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/interpreterInfo.py'
}
User Settings
languageServer: "Pylance"
terminal
• executeInFileDir: "<placeholder>"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
triage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Activity
ROGERDJQ commentedon Dec 28, 2023
a new finding is that it seems related to certain directory that it works well in some directory but hell not in another.
ROGERDJQ commentedon Dec 29, 2023
through completely uninstall/install vscode and the remote vscode-server, it can at least render ipynb files normally, yet the bug of Discovering Python Interpreters is still there.
karrtikr commentedon Dec 31, 2023
Please provide the debug logs which can help diagnose the issue:
Developer: Set log levelcommandTraceDeveloper: Reload WindowcommandOutput for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)ROGERDJQ commentedon Jan 2, 2024
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)ROGERDJQ commentedon Jan 2, 2024
I tried on other machines and all were well. It seems related to this machine specifically. However, it fails in finding python in both jupyter and plain .py files on this machine.
rootsmusic commentedon Jan 2, 2024
I've repeatedly experienced this issue but not every time.
ROGERDJQ commentedon Jan 4, 2024
I change to another machine which works fine at first. However, when I try to open a large folder in File Explorer, which results in a vscode collapse, and after I reload the window, this endless Discovering Python Interpreters happens again in this new machine, which also only happens in this folder.
log is here.
python.log
ROGERDJQ commentedon Jan 12, 2024
any updates?
karrtikr commentedon Mar 28, 2024
ROGERDJQ It seems searching for
pyenvenvironments never finishes based on the logs. It's hard to tell what exactly might be going on without more logging. But you can try deleting all pyenv directories in the machine.A lot of these issues have recently been addressed as well, so try out the latest pre-release and please open a new issue using
Python: Report Issuecommand, while providing the debug logs again. That'll increase the chances of the issue being addressed, if more people run into it. Closing for now, as the logging has changed and we require a fresh report.ROGERDJQ commentedon Apr 5, 2024
work well using the latest python extensions