Repository navigation
Cannot read properties of undefined (reading 'show') #958
Description
Activity
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 terminal- addedconfirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.The issue needs to be confirmed through a maintainer reproducing the bug.
on Dec 8, 2025 anthonykim1 commented
on Dec 11, 2025 ContributorMore actionsIm 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.
- addedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugarea-terminalEnvironment extension specific terminal issues.Environment extension specific terminal issues.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 terminaland removedconfirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.The issue needs to be confirmed through a maintainer reproducing the bug.
on Dec 11, 2025 - addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Dec 11, 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 environmentI'm using python environment v1.14.0
parameters
"python.useEnvironmentsExtension": true, "python-envs.terminal.autoActivationType": "shellStartup", "python-envs.defaultEnvManager": "ms-python.python:poetry",vscode added this to my .zshrc file
# >>> vscode python # version: 0.1.1 if [ -z "$VSCODE_PYTHON_AUTOACTIVATE_GUARD" ]; then export VSCODE_PYTHON_AUTOACTIVATE_GUARD=1 if [ -n "$VSCODE_PYTHON_ZSH_ACTIVATE" ] && [ "$TERM_PROGRAM" = "vscode" ]; then eval "$VSCODE_PYTHON_ZSH_ACTIVATE" || true fi fi # <<< vscode pythonkarthiknadig commented
on Dec 12, 2025 MemberMore actionsCan you share the call stack of the error? It should be there in the logs output > Python Extension or in Help > Toggle developer tools.
I set the log at debug level and got
log of python extension
2025-12-12 14:49:17.974 [info] > /bin/python3 ~/.vscode-server/extensions/ms-python.python-2025.20.0-linux-x64/python_files/normalizeSelection.pylog of python env
2025-12-12 14:49:18.474 [debug] Activating terminal: /home/quentin/Projet/my_project/.venv/bin/python 2025-12-12 14:49:19.532 [debug] Shell execution started: source /home/quentin/Projet/my_project/.venv/bin/activate 2025-12-12 14:49:19.532 [debug] Checking venv (ms-python.python:venv) for /home/quentin/Projet/my_project/.venv/bin/python 2025-12-12 14:49:19.532 [debug] Using venv (ms-python.python:venv) to handle /home/quentin/Projet/my_project/.venv/bin/python 2025-12-12 14:49:19.555 [info] Terminal is activated: /home/quentin/Projet/my_project/.venv/bin/python 2025-12-12 14:49:19.555 [debug] Checking venv (ms-python.python:venv) for /home/quentin/Projet/my_project/.venv/bin/python 2025-12-12 14:49:19.556 [debug] Using venv (ms-python.python:venv) to handle /home/quentin/Projet/my_project/.venv/bin/python 2025-12-12 14:49:23.078 [debug] Checking venv (ms-python.python:venv) for /home/quentin/Projet/my_project/.venv/bin/python 2025-12-12 14:49:23.078 [debug] Using venv (ms-python.python:venv) to handle /home/quentin/Projet/my_project/.venv/bin/python 2025-12-12 14:49:23.198 [debug] Checking venv (ms-python.python:venv) for /home/quentin/Projet/my_project/.venv/bin/python 2025-12-12 14:49:23.198 [debug] Using venv (ms-python.python:venv) to handle /home/quentin/Projet/my_project/.venv/bin/pythonlog of "Extension Host (remote)"
2025-12-12 14:49:19.532 [error] TypeError: Cannot read properties of undefined (reading 'show') at b.executeCommand (/home/quentin/.vscode-server/extensions/ms-python.python-2025.20.0-linux-x64/out/client/extension.js:2:316843) at y.executeCommand (/home/quentin/.vscode-server/extensions/ms-python.python-2025.20.0-linux-x64/out/client/extension.js:2:331216) at E.execute (/home/quentin/.vscode-server/extensions/ms-python.python-2025.20.0-linux-x64/out/client/extension.js:2:892308) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async P.executeSelection (/home/quentin/.vscode-server/extensions/ms-python.python-2025.20.0-linux-x64/out/client/extension.js:2:877143) at async P.executeSelectionInTerminal (/home/quentin/.vscode-server/extensions/ms-python.python-2025.20.0-linux-x64/out/client/extension.js:2:876605) at async /home/quentin/.vscode-server/extensions/ms-python.python-2025.20.0-linux-x64/out/client/extension.js:2:874599 at async cA.h (file:///home/quentin/.vscode-server/bin/618725e67565b290ba4da6fe2d29f8fa1d4e3622/out/vs/workbench/api/node/extensionHostProcess.js:116:41740) python.execSelectionInTerminal {"value":"ms-python.python","_lower":"ms-python.python"}8 remaining items
- added this to the This milestone has been deleted milestone
on 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).poetry config virtualenvs.in-project trueThe env is already selected as the python interpreter of the project.
- without python environment : when I shift+enter code => it fails a lot
- with python environment -> it has not kept the information of the selected interpreter, the env is not list in the poetry list but in venv. Once I select it as my python interpreter, the shift+enter on code works. At first, the coloration of installed python packages does not work, but once I reopen vscode, the coloration is ok.
Enregistrement.de.lecran.2025-12-15.114849.1.mp4
I change the poetry config
poetry config virtualenvs.in-project falseThe environment is discovered and automatically select has the python interpreter
Enregistrement.de.lecran.2025-12-15.131239.mp4
- removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Dec 15, 2025 anthonykim1 commented
on Dec 15, 2025 ContributorMore actionswas 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
- addedimportantIssue identified as high-priorityIssue identified as high-priority
on Dec 15, 2025 - added a commit that references this issue
on Dec 16, 2025 - addedverifiedVerification succeededVerification succeededcandidateIssue identified as probable candidate for fixing in the next releaseIssue identified as probable candidate for fixing in the next release
on Dec 16, 2025 - added a commit that references this issue
on Dec 16, 2025 - locked as resolved and limited conversation to collaborators
on Apr 28, 2026
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:
When I uncomment
"python-envs.terminal.autoActivationType": "shellStartup", the code is usually run in the zsh terminal and the python terminal is not activeSteps to reproduce:
Capture.video.du.2025-10-31.15-42-21.webm
Diagnostic data
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)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
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
A/B Experiments