Repository navigation
Cannot read properties of undefined (reading 'show') #958
Copy link
Copy link
Closed
microsoft/vscode-python
#25669Labels
area-activationIssue related to activation. Root cause can be from interpreter selection or activation in terminalIssue related to activation. Root cause can be from interpreter selection or activation in terminalarea-terminalEnvironment extension specific terminal issues.Environment extension specific terminal issues.bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releaseIssue identified as probable candidate for fixing in the next releaseimportantIssue identified as high-priorityIssue identified as high-priorityverifiedVerification succeededVerification succeeded
Milestone
Description
Type: Bug
Behaviour
When I select python code and hit shift + Enter for the first time, a python terminal starts, the python code is not run in ther terminal and a window opens with the message "Cannot read properties of undefined (reading 'show')"
I use zsh terminal, poetry as env manager and ipython as python terminal.
I have the following parameters:
"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"],
"python.useEnvironmentsExtension": true,
// "python-envs.terminal.autoActivationType": "shellStartup",
"python-envs.defaultEnvManager": "ms-python.python:poetry",
"python-envs.defaultPackageManager": "ms-python.python:poetry",
When I uncomment "python-envs.terminal.autoActivationType": "shellStartup", the code is usually run in the zsh terminal and the python terminal is not active
Steps to reproduce:
Capture.video.du.2025-10-31.15-42-21.webm
Diagnostic data
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
Extension version: 1.10.0
VS Code version: Code 1.105.1 (7d842fb85a0275a4a8e4d7e040d2625abbf7f084, 2025-10-14T22:33:36.618Z)
OS version: Linux x64 6.14.0-34-generic
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | 13th Gen Intel(R) Core(TM) i7-13620H (16 x 400) |
| GPU Status | 2d_canvas: enabled direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off trees_in_viz: disabled_off video_decode: enabled video_encode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off webnn: disabled_off |
| Load (avg) | 1, 1, 1 |
| Memory (System) | 31.04GB (17.40GB free) |
| Process Argv | --crash-reporter-id a87c9fe0-82ab-4ddf-93a4-a8ee0d063686 |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | ubuntu |
| XDG_CURRENT_DESKTOP | Unity |
| XDG_SESSION_DESKTOP | ubuntu |
| XDG_SESSION_TYPE | x11 |
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
aj953862:31281341
nes-set-on:31351930
6abeh943:31336334
envsdeactivate2:31353495
aa_c:31379599
gendocstringf:31405073
0574c672:31404437
cloudbuttont:31379625
todos-1:31405332
v66_all_req:31402695
treatment_gpt5applypatchexclusively:31398171
3efgi100_wstrepl:31403338
trigger-command-fix:31379601
auto_model_enabled:31385282
use-responses-api:31390855
applesignin:31399435
2a0ce269:31405347
ff8f5884:31411053
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-activationIssue related to activation. Root cause can be from interpreter selection or activation in terminalIssue related to activation. Root cause can be from interpreter selection or activation in terminalarea-terminalEnvironment extension specific terminal issues.Environment extension specific terminal issues.bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releaseIssue identified as probable candidate for fixing in the next releaseimportantIssue identified as high-priorityIssue identified as high-priorityverifiedVerification succeededVerification succeeded
Activity
Quentin62 commentedon Nov 14, 2025
I don't have the message "Cannot read properties of undefined (reading 'show')" since the last update.
Now I have the following message and the python terminal is not launched:
When I select a python interpreter and retry, I have always the same message and issue.
When I set
"python.useEnvironmentsExtension": false, the python terminal is running but the selected code is run in the zsh terminal before the activation of the python terminalanthonykim1 commentedon Dec 11, 2025
Im glad you dont see
"Cannot read properties of undefined (reading 'show')"To get the python environment to activate before your command, you need shell startup from environment extension
Try with latest insiders and latest pre-release of Python env extension.
Quentin62 commentedon Dec 12, 2025
I got a new laptop at work and had to make a new configuration for ubuntu on WSL and the problem is still there:
When I use the python environment and run selected code, awindow "Cannot read properties of undefined (reading 'show')" appears and the code is not run in the activated environment
I'm using python environment v1.14.0
parameters
vscode added this to my .zshrc file
karthiknadig commentedon Dec 12, 2025
Can you share the call stack of the error? It should be there in the logs output > Python Extension or in Help > Toggle developer tools.
Quentin62 commentedon Dec 12, 2025
I set the log at debug level and got
log of python extension
log of python env
log of "Extension Host (remote)"
8 remaining items
Quentin62 commentedon Dec 15, 2025
I open an existing project, with a virtual env created by poetry in the project folder (I changed the default config of poetry because the created envs in the folder
/home/<username>/pypoetry/were not easily found by vscode).The env is already selected as the python interpreter of the project.
Enregistrement.de.lecran.2025-12-15.114849.1.mp4
Quentin62 commentedon Dec 15, 2025
I change the poetry config
The environment is discovered and automatically select has the python interpreter
Enregistrement.de.lecran.2025-12-15.131239.mp4
anthonykim1 commentedon Dec 15, 2025
was able to finally repro (reading 'show') problem. Happens on useEnvironmentExtension route, with command as activation in new fresh terminal shift+enter.
/cc Eleanor Boyd (@eleanorjboyd) for environment, poetry related
Switch to queue based execution for executing Python code (#25669)
Switch to queue based execution for executing Python code (microsoft#…
Switch to queue based execution for executing Python code (#25669) (#…