Skip to content

notification was needed to select the right env #19897

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
meganrogge opened this issue Sep 27, 2022 · 8 comments · Fixed by #19925
Closed

notification was needed to select the right env #19897

meganrogge opened this issue Sep 27, 2022 · 8 comments · Fixed by #19925
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on verified Verification succeeded

Comments

@meganrogge
Copy link

meganrogge commented Sep 27, 2022

Testing #19883

My python3 is installed at /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.

When I ran the command, it couldn't find any installations and had automatically selected python 2, which was not working

Python interpreter path: ~/.pyenv/versions/2.7.18/bin/python
> ~/.pyenv/versions/2.7.18/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/interpreterInfo.py
Starting Pylance language server.
[ERROR 2022-8-27 12:25:58.598]: Virtual env creation requires an interpreter.
Running Env creation script:  [
  '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3',
  '/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/create_venv.py',
  '--git-ignore',
  '--install'
]

Knowing I had installed python3, and had aliased it to python, I found the path of python3 and inserted it into the input box. The logs show that it succeeded after that.

@meganrogge meganrogge changed the title notification was needed to slect the right env notification was needed to select the right env Sep 27, 2022
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Sep 27, 2022
@karthiknadig
Copy link
Member

Looks like the issue is that discovery did not find all the global installs when running through create env steps.

@karrtikr
Copy link

@meganrogge Can you please provide the logs as well?

  • Set python.logging.level to debug in User settings
  • Run Python: Clear cache and reload
  • Run Python: Select Interpreter command and wait for discovery to complete before capturing the logs.
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Log should contain details of the discovered interpreters, I expect it to contain /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 as well.

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Sep 27, 2022
@meganrogge
Copy link
Author

Yep, here they are

[DEBUG 2022-8-27 13:1:42.331]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.333]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.335]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.335]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.336]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.336]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.341]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.341]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.342]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.342]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.360]: Waiting for test server to start...
LSP Notebooks experiment is enabled
LSP Notebooks interactive window support is enabled
[INFO 2022-8-27 13:1:42.366]: [
  'Display locator refreshing progress, Class name = g, completed in 1ms, has a falsy return value, , Return Value: undefined'
]
[DEBUG 2022-8-27 13:1:42.369]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.369]: Searching for conda.
[DEBUG 2022-8-27 13:1:42.384]: Probing conda binary: conda
[DEBUG 2022-8-27 13:1:42.386]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.386]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.389]: Test server started.
[DEBUG 2022-8-27 13:1:42.389]: Testing: Setting up watcher for /Users/meganrogge/Repos/vscode
[DEBUG 2022-8-27 13:1:42.394]: Failed to spawn conda binary conda [Error: spawn ENOTDIR
	at ChildProcess.spawn (node:internal/child_process:413:11)
	at spawn (node:child_process:720:9)
	at t.plainExec (/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/out/client/extension.js:2:240664)
	at s.exec (/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/out/client/extension.js:2:228437)
	at t.exec (/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/out/client/extension.js:2:626841)
	at async y.getInfoImpl (/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/out/client/extension.js:2:609903)
	at async y.locate (/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/out/client/extension.js:2:609323)
	at async a.doIterEnvs (/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/out/client/extension.js:2:583490)
	at async a.iterEnvs (/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/out/client/extension.js:2:566403)
	at async i (/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/out/client/extension.js:2:288050)] {
  errno: -20,
  code: 'ENOTDIR',
  syscall: 'spawn'
}
[DEBUG 2022-8-27 13:1:42.395]: Searching for workspace virtual envs in: /Users/meganrogge/Repos/vscode
[DEBUG 2022-8-27 13:1:42.395]: Searching for poetry virtual envs in: /Users/meganrogge/Repos/vscode/.venv
[DEBUG 2022-8-27 13:1:42.403]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.403]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.412]: Poetry Virtual Environment: [added] /Users/meganrogge/Repos/vscode/.venv/bin/python
[DEBUG 2022-8-27 13:1:42.420]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.420]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.423]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.423]: Cached data exists getEnvironmentVariables, <No Resource>
[DEBUG 2022-8-27 13:1:42.423]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectionInterpretersQueried-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
> ~/.pyenv/versions/2.7.18/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/interpreterInfo.py
[INFO 2022-8-27 13:1:42.451]: Found: /usr/bin/python3 --> /usr/bin/python3
[DEBUG 2022-8-27 13:1:42.455]: Couldn't locate the conda binary.
[DEBUG 2022-8-27 13:1:42.455]: Couldn't locate the conda binary.
[DEBUG 2022-8-27 13:1:42.477]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.477]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.479]: Cached data exists getEnvironmentVariables, <No Resource>
> ./.venv/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/interpreterInfo.py
[INFO 2022-8-27 13:1:42.487]: Found: /usr/local/bin/python --> /usr/bin/python3
[INFO 2022-8-27 13:1:42.488]: Found: /usr/local/bin/python3 --> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
[INFO 2022-8-27 13:1:42.491]: Found: /usr/local/bin/python3.9 --> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
[INFO 2022-8-27 13:1:42.507]: Found: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 --> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
[INFO 2022-8-27 13:1:42.507]: Found: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 --> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
[DEBUG 2022-8-27 13:1:42.513]: Workspace Virtual Environment: [added] /Users/meganrogge/Repos/vscode/.venv/bin/python
[DEBUG 2022-8-27 13:1:42.513]: Workspace Virtual Environment: [skipped] /Users/meganrogge/Repos/vscode/.venv/bin/python3
[DEBUG 2022-8-27 13:1:42.514]: Workspace Virtual Environment: [skipped] /Users/meganrogge/Repos/vscode/.venv/bin/python3.9
[DEBUG 2022-8-27 13:1:42.518]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.518]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[INFO 2022-8-27 13:1:42.859]: Found interpreter for /Users/meganrogge/Repos/vscode/.venv/bin/python,/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/get_output_via_markers.py,/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/interpreterInfo.py
[DEBUG 2022-8-27 13:1:42.860]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.860]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.862]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:42.862]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[INFO 2022-8-27 13:1:43.5]: Found interpreter for /Users/meganrogge/.pyenv/versions/2.7.18/bin/python,/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/get_output_via_markers.py,/Users/meganrogge/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/interpreterInfo.py
[DEBUG 2022-8-27 13:1:43.6]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.6]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[INFO 2022-8-27 13:1:43.309]: Environments added to cache [{"name":"2.7.18","location":"/Users/meganrogge/.pyenv/versions/2.7.18","kind":"global-pyenv","executable":{"filename":"/Users/meganrogge/.pyenv/versions/2.7.18/bin/python","sysPrefix":"/Users/meganrogge/.pyenv/versions/2.7.18","ctime":1649455834936,"mtime":1649455834936},"display":"Python 2.7.18 64-bit ('2.7.18')","version":{"major":2,"minor":7,"micro":18,"release":{"level":"final","serial":0},"sysVersion":"2.7.18 (default, Apr  8 2022, 15:08:24) \n[GCC Apple LLVM 13.1.6 (clang-1316.0.21.2)]"},"arch":3,"distro":{"org":""},"source":[],"id":"/Users/meganrogge/.pyenv/versions/2.7.18/bin/python","detailedDisplayName":"Python 2.7.18 64-bit ('2.7.18': pyenv)"},{"name":".venv","location":"/Users/meganrogge/Repos/vscode/.venv","kind":"virt-venv","executable":{"filename":"/Users/meganrogge/Repos/vscode/.venv/bin/python","sysPrefix":"/Users/meganrogge/Repos/vscode/.venv","ctime":1664306812679,"mtime":1664306812679},"searchLocation":{"$mid":1,"path":"/Users/meganrogge/Repos/vscode/.venv","scheme":"file"},"display":"Python 3.9.5 ('.venv': venv)","version":{"major":3,"minor":9,"micro":5,"release":{"level":"final","serial":0},"sysVersion":"3.9.5 (v3.9.5:0a7dcbdb13, May  3 2021, 13:17:02) \n[Clang 6.0 (clang-600.0.57)]"},"arch":3,"distro":{"org":""},"source":[],"type":"Virtual","id":"/Users/meganrogge/Repos/vscode/.venv/bin/python","detailedDisplayName":"Python 3.9.5 ('.venv': venv)"}]
[INFO 2022-8-27 13:1:43.310]: [
  'Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined'
]
[DEBUG 2022-8-27 13:1:43.311]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.311]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.311]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.312]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.312]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.312]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.313]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.313]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.314]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.314]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.314]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.314]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.314]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.315]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.315]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.315]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.318]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.318]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.318]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.319]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.319]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.319]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.319]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.319]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.320]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.320]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.320]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.320]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.321]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.321]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.321]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.322]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.323]: Cached data exists getEnvironmentVariables, <No Resource>
[DEBUG 2022-8-27 13:1:43.323]: Cached data exists getEnvironmentVariables, <No Resource>
[DEBUG 2022-8-27 13:1:43.323]: Cached data exists getEnvironmentVariables, <No Resource>
[DEBUG 2022-8-27 13:1:43.323]: Cached data exists getEnvironmentVariables, <No Resource>
[DEBUG 2022-8-27 13:1:43.323]: Cached data exists getEnvironmentVariables, <No Resource>
[DEBUG 2022-8-27 13:1:43.323]: Cached data exists getEnvironmentVariables, <No Resource>
Python interpreter path: ~/Repos/vscode/.venv/bin/python
[INFO 2022-8-27 13:1:43.975]: [
  'Starting language server, Class name = d, completed in 642ms, has a falsy return value, , Return Value: undefined'
]
Starting Pylance language server.
[DEBUG 2022-8-27 13:1:43.980]: [object Object]. Shell identified as undefined 
[DEBUG 2022-8-27 13:1:43.980]: Shell path '/bin/zsh', base path '/bin/zsh'
[DEBUG 2022-8-27 13:1:43.980]: Shell path identified as shell 'zsh'
[DEBUG 2022-8-27 13:1:43.980]: Terminal shell path '/bin/zsh' identified as shell 'zsh'
[DEBUG 2022-8-27 13:1:43.980]: [object Object]. Shell identified as zsh 
[DEBUG 2022-8-27 13:1:43.980]: Shell identified as 'zsh'
[DEBUG 2022-8-27 13:1:43.981]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.981]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:43.982]: Cached data exists KeyPrefix=Cache_Method_Output_f.addKeyToStorage-Args="workspace"-Arg-Separator-"autoSelectedWorkspacePythonInterpreter-/Users/meganrogge/Repos/vscode"-Arg-Separator-undefined
[DEBUG 2022-8-27 13:1:44.28]: Cached data exists getEnvironmentVariables, /Users/meganrogge/Repos/vscode
[DEBUG 2022-8-27 13:2:7.855]: Cached data exists KeyPrefix=Cache_Method_Output__.ensureEnvironmentContainsPython-Args="/Users/meganrogge/Repos/vscode/.venv/bin/python"

And yes, it did show up in the select interpreter dropdown this time

@karrtikr
Copy link

And yes, it did show up in the select interpreter dropdown this time

Thanks. I assume you mean the dropdown opened by Python: Select Interpreter.

@karthiknadig It seems to me that the bug is here:

. We're not checking whether a refresh is going on at the moment and automatically select the interpreter. We need to either wait for refresh to complete or always show the dropdown.

@karrtikr karrtikr assigned karthiknadig and unassigned karrtikr Sep 27, 2022
@karthiknadig
Copy link
Member

@karrtikr I will go with always showing the interpreter selection for now.

@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on and removed info-needed Issue requires more information from poster labels Sep 27, 2022
@karrtikr
Copy link

Checking whether a refresh is going on should be easy as well, simply check if this.discoveryApi.getRefreshPromise() is defined along with the interpreters.length === 1 check.

@karthiknadig
Copy link
Member

I think I was over simplifying, I think we need to let the UI show. For the reason, that if the user only has python 2.7, then this is the only way they know. Also, the experience with showing discovery progress and selection is better with the select interpreter UI.

@karrtikr karrtikr added area-environments Features relating to handling interpreter environments and removed triage-needed Needs assignment to the proper sub-team labels Sep 27, 2022
@karrtikr karrtikr added this to the September 2022 milestone Sep 27, 2022
@karrtikr karrtikr added the verified Verification succeeded label Oct 3, 2022
@karrtikr
Copy link

karrtikr commented Oct 3, 2022

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 bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants