Skip to content

Change text to "Select at workspace level" instead of "Entire workspace" when selecting or clearing interpreters in a multiroot folder scenario #17037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ishalad opened this issue Aug 19, 2021 · 12 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments debt Covers everything internal: CI, testing, refactoring of the codebase, etc. good first issue verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@ishalad
Copy link

ishalad commented Aug 19, 2021

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

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Aug 19, 2021
@karthiknadig karthiknadig added triage bug Issue identified by VS Code Team member as probable bug and removed triage-needed Needs assignment to the proper sub-team labels Aug 19, 2021
@karrtikr
Copy link

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 karrtikr added the info-needed Issue requires more information from poster label Aug 19, 2021
@karthiknadig karthiknadig added area-environments Features relating to handling interpreter environments and removed info-needed Issue requires more information from poster labels Aug 19, 2021
@karrtikr
Copy link

karrtikr commented Aug 19, 2021

Please provide the logs as mentioned in the issue template.

Logs

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

XXX

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Aug 19, 2021
@software-artisan
Copy link

software-artisan commented 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]

  1. created a new workspace
  2. added a directory with python code to the workspace
  3. 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"
    • image
  4. Tried View > Command Palette > Python:Select Interpreter > "Entire Workspace" and chose an interpreter from the list
  5. This selection was not applied.
  6. 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
  7. Tried View > Command Palette > Python:Select Interpreter > "some folder" and chose an interpreter from the list
  8. 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.

  • image

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
Copy link

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.

@karrtikr karrtikr added feature-request Request for new features or functionality good first issue needs PR and removed bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage labels Sep 15, 2021
@karrtikr karrtikr removed their assignment Sep 15, 2021
@karrtikr karrtikr changed the title select python interpreter showing Change text to "Select at workspace level" instead of "Entire workspace" when selecting interpreters in a multiroot folder scenario Sep 15, 2021
@software-artisan
Copy link

Thank you @karrtikr! How can I unset an interpreter set at the folder level? I have a few multi-folder workspaces and I just want to set the interpreter at the workspace level.. and not have any interpreter selected at the folder level.. I seem to have accidently set an interpreter at the folder level and can't find a way to remove that.. please let me know.

@karrtikr karrtikr changed the title Change text to "Select at workspace level" instead of "Entire workspace" when selecting interpreters in a multiroot folder scenario Change text to "Select at workspace level" instead of "Entire workspace" when setting or unsetting interpreters in a multiroot folder scenario Sep 20, 2021
@karrtikr karrtikr changed the title Change text to "Select at workspace level" instead of "Entire workspace" when setting or unsetting interpreters in a multiroot folder scenario Change text to "Select at workspace level" instead of "Entire workspace" when selecting or clearing interpreters in a multiroot folder scenario Sep 20, 2021
@karrtikr
Copy link

You can use the Python: Clear Workspace Interpreter Setting command to clear out the setting 🙂

@karrtikr karrtikr added debt Covers everything internal: CI, testing, refactoring of the codebase, etc. and removed feature-request Request for new features or functionality labels Sep 20, 2021
@software-artisan
Copy link

You can use the Python: Clear Workspace Interpreter Setting command to clear out the setting 🙂

Thanks again @karrtikr .. Hmm, I did look at the command palette for possible commands but missed this somehow. This will help a lot.

@Quynhd07
Copy link

Quynhd07 commented Oct 1, 2021

@luabud can I get assigned to this?

@luabud
Copy link
Member

luabud commented Oct 1, 2021

@Quynhd07 done! 😊

karthiknadig pushed a commit that referenced this issue Oct 2, 2021
…earing interpreters (#17588)

* update entire workspace text

* add news item

* add news item

Co-authored-by: Quynh <[email protected]>
karthiknadig pushed a commit to karthiknadig/vscode-python that referenced this issue Oct 4, 2021
…ing or clearing interpreters (microsoft#17588)

* update entire workspace text

* add news item

* add news item

Co-authored-by: Quynh <[email protected]>
karthiknadig added a commit that referenced this issue Oct 4, 2021
* Add a quick note about limited support on the web

* Tweak the description for virtual workspaces support

Closes #17600

* Update to vscode-extension-telemetry 0.4.2 (#17608)

* Update to vscode-extension-telemetry 0.4.2

* Add news

* Update to latest version of Jedi LS (#17591)

* Update to latest version of Jedi LS

* Add news

* Release candidate (#17610)

* Update version

* Update change logs

* Update notice

* Update main branch version (#17611)

* Reworded message for A/B testing in the output channel as per issue #6352 (#17584)

* Reworded message for A/B testing

* Reworded message for A/B testing

* Create 6352.md

* Added replaceAll for string prototype & unit tests (#17582)

* Added replaceAll for string prototype & unit tests

* Create 15288.md

* Bug Fix: use replaceAll for replacing separators.

* Ran prettier on updated files.

Co-authored-by: Aliva Das <[email protected]>

* Issue #17019: Reword commands in Run/Debug button in editor title (#17592)

* Reword commands in Run/Reword commands in Run/Debug button in editor title button in editor title

* fixed verbage

* update the wording in news file.

* Update news/2 Fixes/17019.md

Co-authored-by: Karthik Nadig <[email protected]>

Co-authored-by: Karthik Nadig <[email protected]>

* Update python version in brew command (#17593)

* Update python version in brew command

Previously brew command installed python version 2 (outdated). Now brew command will install python 3.

* Create 17590.md

* Rewording news file description

Co-authored-by: Karthik Nadig <[email protected]>

Co-authored-by: Karthik Nadig <[email protected]>

* Improve setting description for enabling A/B tests (#17585)

* Issue 7793 solved, rewrite discription for experiment enabling

* added news entry

* Update news/2 Fixes/7793.md

* Update news/2 Fixes/7793.md

* Update news/2 Fixes/7793.md

* moved news entry from 2 Fixes to 1 Enhancement

* Issue #17037: Update text for "entire workspace" when selecting or clearing interpreters  (#17588)

* update entire workspace text

* add news item

* add news item

Co-authored-by: Quynh <[email protected]>

Co-authored-by: Brett Cannon <[email protected]>
Co-authored-by: Kim-Adeline Miguel <[email protected]>
Co-authored-by: Vidushi Gupta <[email protected]>
Co-authored-by: Aliva Das <[email protected]>
Co-authored-by: Aliva Das <[email protected]>
Co-authored-by: Anna Arsentieva <[email protected]>
Co-authored-by: Carolinekung2 <[email protected]>
Co-authored-by: Thi Le <[email protected]>
Co-authored-by: Quynhd07 <[email protected]>
Co-authored-by: Quynh <[email protected]>
karthiknadig pushed a commit to karthiknadig/vscode-python that referenced this issue Oct 13, 2021
…ing or clearing interpreters (microsoft#17588)

* update entire workspace text

* add news item

* add news item

Co-authored-by: Quynh <[email protected]>
karthiknadig pushed a commit that referenced this issue Oct 13, 2021
…earing interpreters (#17588)

* update entire workspace text

* add news item

* add news item

Co-authored-by: Quynh <[email protected]>
@karrtikr karrtikr added this to the October 2021 milestone Oct 25, 2021
@karrtikr
Copy link

Fixed by @Quynhd07 🙂

@karrtikr karrtikr added the verification-needed Verification of issue is requested label Oct 25, 2021
@rchiodo rchiodo added the verified Verification succeeded label Oct 26, 2021
@rchiodo
Copy link

rchiodo commented 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
Copy link

rchiodo commented Oct 26, 2021

Added a new issue for the workspace level command:
#17854

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments debt Covers everything internal: CI, testing, refactoring of the codebase, etc. good first issue verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants