Repository navigation
Cannot read properties of undefined (reading 'show') and Invalid arguments to create terminal #1062
Description
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
anthonykim1 commentedon Dec 14, 2025
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?
Beenjamming commentedon Dec 14, 2025
"python.useEnvironmentsExtension": false, was the ticket. Thank you! Spent 2+ hours trying to figure that one out. Was previously working btw.
anthonykim1 commentedon Dec 15, 2025
Ben (@Beenjamming) This is concerning, maybe a problem specific for env extension.
Possibly dup of #958
What was your interpreter setup?
Beenjamming commentedon Dec 16, 2025
Not sure if this is what you were looking for. All are added to PATH
anthonykim1 commentedon Dec 16, 2025
Thanks, microsoft/vscode-python#25669 would help starting next version of Python extension (coming soon).