Skip to content

Cannot read properties of undefined (reading 'show') and Invalid arguments to create terminal #1062

Closed

Description

@Beenjamming

Unable to shift enter and run python code line by line. Invalid arguments to create terminal and Cannot read properties of undefined (reading 'show') errors.

Have reinstalled with fresh install and problem persists. Can run the file using the run command successfully and manually create a terminal.

Version: 1.107.0 (user setup)
Commit: 618725e67565b290ba4da6fe2d29f8fa1d4e3622
Date: 2025-12-10T07:43:47.883Z
Electron: 39.2.3
ElectronBuildId: 12895514
Chromium: 142.0.7444.175
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

Python extension = 2025.20.0

Here is the dev tool window output:

console.ts:139 [Extension Host] rejected promise not handled within 1 second: Error: Invalid arguments to create terminal
yks @ console.ts:139
$logExtensionHostMessage @ mainThreadConsole.ts:39
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
C @ event.ts:1202
fire @ event.ts:1233
fire @ ipc.net.ts:652
l.onmessage @ localProcessExtensionHost.ts:383
console.ts:139 [Extension Host] stack trace: Error: Invalid arguments to create terminal
at t.ensureTerminalLegacy (c:\Users\micha.vscode\extensions\ms-python.python-2025.20.0-win32-x64\out\client\extension.js:2:460070)
at async b.ensureTerminal (c:\Users\micha.vscode\extensions\ms-python.python-2025.20.0-win32-x64\out\client\extension.js:2:317674)
at async b.sendCommand (c:\Users\micha.vscode\extensions\ms-python.python-2025.20.0-win32-x64\out\client\extension.js:2:316337)
at async c:\Users\micha.vscode\extensions\ms-python.python-2025.20.0-win32-x64\out\client\extension.js:2:892904
yks @ console.ts:139
$logExtensionHostMessage @ mainThreadConsole.ts:39
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
C @ event.ts:1202
fire @ event.ts:1233
fire @ ipc.net.ts:652
l.onmessage @ localProcessExtensionHost.ts:383
mainThreadExtensionService.ts:79 [ms-python.python]Invalid arguments to create terminal
$onExtensionRuntimeError @ mainThreadExtensionService.ts:79
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
C @ event.ts:1202
fire @ event.ts:1233
fire @ ipc.net.ts:652
l.onmessage @ localProcessExtensionHost.ts:383
mainThreadExtensionService.ts:80 Error: Invalid arguments to create terminal
at t.ensureTerminalLegacy (c:\Users\micha.vscode\extensions\ms-python.python-2025.20.0-win32-x64\out\client\extension.js:2:460070)
at async b.ensureTerminal (c:\Users\micha.vscode\extensions\ms-python.python-2025.20.0-win32-x64\out\client\extension.js:2:317674)
at async b.sendCommand (c:\Users\micha.vscode\extensions\ms-python.python-2025.20.0-win32-x64\out\client\extension.js:2:316337)
at async c:\Users\micha.vscode\extensions\ms-python.python-2025.20.0-win32-x64\out\client\extension.js:2:892904
$onExtensionRuntimeError @ mainThreadExtensionService.ts:80
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
C @ event.ts:1202
fire @ event.ts:1233
fire @ ipc.net.ts:652
l.onmessage @ localProcessExtensionHost.ts:383
log.ts:460 ERR An unknown error occurred. Please consult the log for more details.

Activity

  1. added
    bugIssue identified by VS Code Team member as probable bug
    area-terminalEnvironment extension specific terminal issues.
    and removed on Dec 14, 2025
  2. anthonykim1 commented on Dec 14, 2025

    @anthonykim1
    Contributor

    Any difference depending on adding the following to your settings.json?
    "python.useEnvironmentsExtension": true, and "python.useEnvironmentsExtension": false,

    Also what is your interpreter setup?

    Is this a regression where it worked in previous Python extension, or environment extension version?

  3. Beenjamming commented on Dec 14, 2025

    @Beenjamming
    Author

    "python.useEnvironmentsExtension": false, was the ticket. Thank you! Spent 2+ hours trying to figure that one out. Was previously working btw.

  4. anthonykim1 commented on Dec 15, 2025

    @anthonykim1
    Contributor

    Ben (@Beenjamming) This is concerning, maybe a problem specific for env extension.
    Possibly dup of #958

    What was your interpreter setup?

  5. Beenjamming commented on Dec 16, 2025

    @Beenjamming
    Author
    Image

    Not sure if this is what you were looking for. All are added to PATH

  6. anthonykim1 commented on Dec 16, 2025

    @anthonykim1
    Contributor

    Thanks, microsoft/vscode-python#25669 would help starting next version of Python extension (coming soon).

  7. locked as resolved and limited conversation to collaborators on Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-terminalEnvironment extension specific terminal issues.bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions