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
Change text to "Select at workspace level" instead of "Entire workspace" when selecting or clearing interpreters in a multiroot folder scenario #17037
I have already selected python interpreter so many times but vscode still showing this warning please help me with this error i m fresher and I really need to solve this issue
Thanks for the bug report, but unfortunately we need some more information from you in order to triage this issue appropriately. Please edit your opening comment by providing a filled-in copy of our issue template. Once you are done please leave a comment to that effect.
VS Code version: 1.60.1
Extension version (available under the Extensions sidebar): v2021.9.1230869389
OS and version: Windows 10 (but using remote ssh into ubuntu 18.04)
Python version (& distribution if applicable, e.g. Anaconda): python 3.8
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions: XXX
Relevant/affected Python-related VS Code extensions and their versions: XXX
Value of the python.languageServer setting: pylance
[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
Expected behaviour
When a "Python Interpreter" is selected, the setting must be applied.
Actual behaviour
When a "Python Interpreter" is selected, the selected interpreter is not applied.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
created a new workspace
added a directory with python code to the workspace
vscode-python extension prompted "No python interpreter is selected. You need to select a python interpreter to enable features such as IntelliSense, linting, and debugging"
Tried View > Command Palette > Python:Select Interpreter > "Entire Workspace" and chose an interpreter from the list
This selection was not applied.
The python interpreter list in step # 4 showed the current interpreter as ./.env/bin/python. I had never set this interpreter. And I didn't see this interpreter specified in user settings or remote ssh settings or workspace settings or folder settings. Not sure where it was pulling it from
Tried View > Command Palette > Python:Select Interpreter > "some folder" and chose an interpreter from the list
This selection was applied..
In summary, to select the interpreter, choosing "entire workspace" did not work. Had to choose one of the folders in the workspace during the "Python: select interpreter" command to set the interpreter..
Logs
The "current interpreter" (which was not set by me; similar to what is described in # 6 above but a different interpreter) in this run is what is shown below.
User belongs to experiment group 'pythonaa'
User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'pythonDiscoveryModuleWithoutWatcher'
User belongs to experiment group 'pythonTensorboardExperiment'
User belongs to experiment group 'pythonSurveyNotificationcf'
User belongs to experiment group 'PythonPyTorchProfiler'
User belongs to experiment group 'pythonDeprecatePythonPath'
User belongs to experiment group 'pythonSortEnvs'
User belongs to experiment group 'pythonRunFailedTestsButtonDisplayedcf'
User belongs to experiment group 'pythonRefreshTestsButtonDisplayed'
User belongs to experiment group 'pythonRememberDebugConfigcf'
Python interpreter path: ~/miniconda3/envs/detectron2/bin/python
Starting Pylance language server.
Error 2021-09-15 23:15:49: Failed to check if file needs to be fixed [EntryNotFound (FileSystemError): Unable to read file 'vscode-remote://ssh-remote+207.180.251.250/home/user/dev/detectron2/.vscode/settings.json' (Error: Unable to resolve non-existing file 'vscode-remote://ssh-remote+207.180.251.250/home/user/dev/detectron2/.vscode/settings.json')
at _handleError (/home/user/.vscode-server/bin/83bd43bc519d15e50c4272c6cf5c1479df196a4d/out/vs/server/remoteExtensionHostProcess.js:94:160087)
at async y.readText (/home/user/.vscode-server/extensions/ms-python.python-2021.9.1230869389/out/client/extension.js:9:314351)
at async p.doesFileNeedToBeFixed (/home/user/.vscode-server/extensions/ms-python.python-2021.9.1230869389/out/client/extension.js:59:823969)
at async /home/user/.vscode-server/extensions/ms-python.python-2021.9.1230869389/out/client/extension.js:59:823096
at async Promise.all (index 1)
at async p.getFilesToBeFixed (/home/user/.vscode-server/extensions/ms-python.python-2021.9.1230869389/out/client/extension.js:59:823042)
at async p.updateTestSettings (/home/user/.vscode-server/extensions/ms-python.python-2021.9.1230869389/out/client/extension.js:59:822669)] {
code: 'FileNotFound'
}
Python interpreter path: ~/miniconda3/envs/infinstor/bin/python
In summary, to select the interpreter, choosing "entire workspace" did not work. Had to choose one of the folders in the workspace during the "Python: select interpreter" command to set the interpreter..
This seems to be expected behavior, as Selecting an intepreter at workspace level won't work if you have already set it at a folder level. Workspace folder settings override workspace settings, just like workspace settings override a user setting. Perhaps we could change the wording "Entire workspace" to "Set at workspace level" to make this clearer.
Activity
karrtikr commentedon Aug 19, 2021
Thanks for the bug report, but unfortunately we need some more information from you in order to triage this issue appropriately. Please edit your opening comment by providing a filled-in copy of our issue template. Once you are done please leave a comment to that effect.
karrtikr commentedon Aug 19, 2021
Please provide the logs as mentioned in the issue template.
Logs
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)software-artisan commentedon Sep 15, 2021
I had a similar but slightly different problem..
Environment data
VS Code version: 1.60.1
Extension version (available under the Extensions sidebar): v2021.9.1230869389
OS and version: Windows 10 (but using remote ssh into ubuntu 18.04)
Python version (& distribution if applicable, e.g. Anaconda): python 3.8
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions: XXX
Relevant/affected Python-related VS Code extensions and their versions: XXX
Value of the python.languageServer setting: pylance
[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
Expected behaviour
When a "Python Interpreter" is selected, the setting must be applied.
Actual behaviour
When a "Python Interpreter" is selected, the selected interpreter is not applied.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
In summary, to select the interpreter, choosing "entire workspace" did not work. Had to choose one of the folders in the workspace during the "Python: select interpreter" command to set the interpreter..
Logs
The "current interpreter" (which was not set by me; similar to what is described in # 6 above but a different interpreter) in this run is what is shown below.
User belongs to experiment group 'pythonaa'
User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'pythonDiscoveryModuleWithoutWatcher'
User belongs to experiment group 'pythonTensorboardExperiment'
User belongs to experiment group 'pythonSurveyNotificationcf'
User belongs to experiment group 'PythonPyTorchProfiler'
User belongs to experiment group 'pythonDeprecatePythonPath'
User belongs to experiment group 'pythonSortEnvs'
User belongs to experiment group 'pythonRunFailedTestsButtonDisplayedcf'
User belongs to experiment group 'pythonRefreshTestsButtonDisplayed'
User belongs to experiment group 'pythonRememberDebugConfigcf'
Python interpreter path: ~/miniconda3/envs/detectron2/bin/python
Starting Pylance language server.
Error 2021-09-15 23:15:49: Failed to check if file needs to be fixed [EntryNotFound (FileSystemError): Unable to read file 'vscode-remote://ssh-remote+207.180.251.250/home/user/dev/detectron2/.vscode/settings.json' (Error: Unable to resolve non-existing file 'vscode-remote://ssh-remote+207.180.251.250/home/user/dev/detectron2/.vscode/settings.json')
at _handleError (/home/user/.vscode-server/bin/83bd43bc519d15e50c4272c6cf5c1479df196a4d/out/vs/server/remoteExtensionHostProcess.js:94:160087)
at async y.readText (/home/user/.vscode-server/extensions/ms-python.python-2021.9.1230869389/out/client/extension.js:9:314351)
at async p.doesFileNeedToBeFixed (/home/user/.vscode-server/extensions/ms-python.python-2021.9.1230869389/out/client/extension.js:59:823969)
at async /home/user/.vscode-server/extensions/ms-python.python-2021.9.1230869389/out/client/extension.js:59:823096
at async Promise.all (index 1)
at async p.getFilesToBeFixed (/home/user/.vscode-server/extensions/ms-python.python-2021.9.1230869389/out/client/extension.js:59:823042)
at async p.updateTestSettings (/home/user/.vscode-server/extensions/ms-python.python-2021.9.1230869389/out/client/extension.js:59:822669)] {
code: 'FileNotFound'
}
Python interpreter path: ~/miniconda3/envs/infinstor/bin/python
karrtikr commentedon Sep 15, 2021
This seems to be expected behavior, as Selecting an intepreter at workspace level won't work if you have already set it at a folder level. Workspace folder settings override workspace settings, just like workspace settings override a user setting. Perhaps we could change the wording
"Entire workspace"to"Set at workspace level"to make this clearer.14 remaining items
luabud commentedon Oct 1, 2021
Quynhd07 done! 😊
Issue #17037: Update text for "entire workspace" when selecting or cl…
Issue microsoft#17037: Update text for "entire workspace" when select…
Update osd (#17612)
Issue microsoft#17037: Update text for "entire workspace" when select…
Issue #17037: Update text for "entire workspace" when selecting or cl…
karrtikr commentedon Oct 25, 2021
Fixed by Quynhd07 🙂
rchiodo commentedon Oct 26, 2021
The text has changed, but "Select at workspace level" doesn't actually work? At least I don't see it having any effect.
rchiodo commentedon Oct 26, 2021
Added a new issue for the workspace level command:
#17854