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

EnvironmentDetails.version contains [Object object] as values #18973

Closed
brettcannon opened this issue Apr 21, 2022 · 3 comments · Fixed by #19841
Closed

EnvironmentDetails.version contains [Object object] as values #18973

brettcannon opened this issue Apr 21, 2022 · 3 comments · Fixed by #19841
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority needs PR Ready to be worked on on-testplan Added to test plan

Comments

@brettcannon
Copy link
Member

Issue Type: Bug

Behaviour

Expected vs. Actual

The array for EnvironmentDetails.version contains things that were not originally strings, e.g. [Object object].

Steps to reproduce:

  1. Get the list of all interpreters on a machine.
  2. Inspect value of version.join(".")

Diagnostic data

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


defaultLS: {"defaultLSType":"Pylance"}

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: true
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true

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

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

tensorBoard
• logDirectory: "<placeholder>"

Extension version: 2022.5.11091652
VS Code version: Code - Insiders 1.67.0-insider (e7c6ad74aff28965d0189ca1dd584f5e9829cf06, 2022-04-19T09:43:36.551Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No
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 (3.59GB free)
Process Argv C:\Users\brcan\OneDrive - Microsoft\Snippets\snippets.md --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 (5.86GB 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:30475217
pynewfile477:30451556

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Apr 21, 2022
@karrtikr
Copy link

I believe the bug is here:

ver.push(`${env.version.release}`);
, as release is an object, could returning the PythonVersion object instead of string[] be more appropriate instead? cc/ @karthiknadig

@karthiknadig
Copy link
Member

We should standardize the version info first before we decide to return an object. I chose to return a string[] here for that reason.

@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug needs PR area-environments Features relating to handling interpreter environments and removed triage-needed Needs assignment to the proper sub-team labels Apr 25, 2022
@karrtikr karrtikr added the important Issue identified as high-priority label May 6, 2022
@luabud
Copy link
Member

luabud commented Jul 27, 2022

#19524

@karrtikr karrtikr added this to the August 2022 milestone Jul 27, 2022
@github-actions github-actions bot removed the needs PR label Aug 9, 2022
@karrtikr karrtikr added the needs PR Ready to be worked on label Aug 9, 2022
@karrtikr karrtikr modified the milestones: August 2022, September 2022 Aug 24, 2022
@karrtikr karrtikr added the on-testplan Added to test plan label Sep 26, 2022
karrtikr pushed a commit that referenced this issue Sep 26, 2022
eleanorjboyd pushed a commit to eleanorjboyd/vscode-python that referenced this issue Oct 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 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 important Issue identified as high-priority needs PR Ready to be worked on on-testplan Added to test plan
Projects
None yet
4 participants