Skip to content
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

Prompted to select virtual envrionment even after it has already been selected #18915

Closed
brettcannon opened this issue Apr 13, 2022 · 4 comments · Fixed by #18928
Closed

Prompted to select virtual envrionment even after it has already been selected #18915

brettcannon opened this issue Apr 13, 2022 · 4 comments · Fixed by #18928
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@brettcannon
Copy link
Member

Issue Type: Bug

Behaviour

Expected vs. Actual

The prompt should not come up when the virtual environment has been specified via the setActiveEnvironment() API.

Steps to reproduce:

  1. Create a virtual environment programmatically.
  2. Set the active environment using setActiveEnvironment().
  3. Notice how you are still prompted to select the new virtual environment.

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.12
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Pylance
User Settings


defaultLS: {"defaultLSType":"Pylance"}

downloadLanguageServer: true

envFile: "<placeholder>"

venvPath: "<placeholder>"

venvFolders: "<placeholder>"

condaPath: "<placeholder>"

pipenvPath: "<placeholder>"

poetryPath: "<placeholder>"

languageServer: "Pylance"

linting
• enabled: false
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: false
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: false
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: false
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: false
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: false
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: false
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: false
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"

sortImports
• args: "<placeholder>"
• path: "<placeholder>"

formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "black"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"

testing
• cwd: "<placeholder>"
• debugPort: 3000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: undefined
• nosetestPath: "<placeholder>"
• promptToConfigure: true
• pytestArgs: "<placeholder>"
• pytestEnabled: false
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: true
• autoTestDiscoverOnSaveEnabled: true

terminal
• activateEnvironment: true
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"

experiments
• enabled: true
• optInto: []
• optOutFrom: []

tensorBoard
• logDirectory: "<placeholder>"

Extension version: 2022.5.11021002
VS Code version: Code - Insiders 1.67.0-insider (fcaeb69ec8e96057423f7dadd52e116e29b80cae, 2022-04-12T05:16:47.168Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No
Remote OS version: Linux x64 5.10.102.1-microsoft-standard-WSL2
Remote OS version: Linux x64 5.10.102.1-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.75GB (1.06GB free)
Process Argv --crash-reporter-id 2f8216b4-0af9-4bf4-a156-6cdcff01b0ab
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.102.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)
Memory (System) 7.64GB (3.57GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.102.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)
Memory (System) 7.64GB (3.57GB free)
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
pythonvspyt200:30323110
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30404738
wslgetstarted:30449409
pythonvsnew555:30438690
vscscmwlcmt:30465136
cppdebugcf:30466690
pynewfile477:30451556

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Apr 13, 2022
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug triage area-environments Features relating to handling interpreter environments and removed triage-needed Needs assignment to the proper sub-team labels Apr 13, 2022
@karrtikr karrtikr added investigating We are looking into the cause of the issue needs PR and removed triage investigating We are looking into the cause of the issue labels Apr 13, 2022
@karrtikr karrtikr added this to the April 2022 milestone Apr 14, 2022
@karrtikr karrtikr added the verification-needed Verification of issue is requested label Apr 14, 2022
@rchiodo
Copy link

rchiodo commented Apr 26, 2022

@brettcannon I assume this is your WWBD extension that would test this?

@brettcannon
Copy link
Member Author

@rchiodo yep, that's how I discovered it. If you need a build to make it easier to test this I can give you one.

@joyceerhl joyceerhl removed the verification-needed Verification of issue is requested label Apr 27, 2022
@rchiodo
Copy link

rchiodo commented Apr 27, 2022

@brettcannon yes please. I'd like to try it out.

@brettcannon
Copy link
Member Author

@joyceerhl joyceerhl added the verified Verification succeeded label May 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 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 verified Verification succeeded
Projects
None yet
5 participants