You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that I remember encountering the situation of pylance being unable to restart from quite a while back (multiple vscode / pylance versions), but I can't tell the exact error(s) I've encountered before.
Repro Steps
Hit the "Python: Restart Language Server" command after a pylance slowdown (might be the key point because restarting pylance when no slowdown has been observed usually works). EDIT: actually I am currently able to reproduce this very crash (same error) every time I restart pylance now.
Observe pylance dying and not restarting.
Expected behavior
Restarted pylance.
Actual behavior
No pylance anymore.
Restarting VSCode or reloading the window fixes this issue.
Logs
"python.analysis.logLevel": "Trace" is set in my user settings.
Output of the "Python" tab
2024-09-11 16:14:37.555 [error] [
'Failed to start language server, Class name = h, completed in 20ms, has a falsy return value, Arg 1: <Uri:/workspaces/biocomp/tboyer/sources/GaussianProxy>, Arg 2: {"id":"/bin/python3.9","sysPrefix":"/usr","envType":"Global","envName":"","envPath":"","path":"/bin/python3.9","architecture":3,"sysVersion":"3.9.5 (default, Nov 23 2021, 15:27:38) \\n[GCC 9.3.0]","version":{"raw":"3.9.5","major":3,"minor":9,"patch":5,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.9.5 64-bit","detailedDisplayName":"Python 3.9.5 64-bit"}, Arg 3: {"documentSelector":[{"scheme":"file","language":"python"},{"scheme":"untitled","language":"python"},{"scheme":"vscode-notebook","language":"python"},{"scheme":"vscode-notebook-cell","language":"python"},{"scheme":"vscode-interactive-input","language":"python"}],"synchronize":{"configurationSection":["python","jupyter.runStartupCommands"]},"outputChannel":{"name":"Python Language Server","logLevel":1},"revealOutputChannelOn":4,"initializationOptions":{"experimentationSupport":true,"trustedWorkspaceSupport":true},"middleware":{"serviceContainer":{"container":{"options":{"autoBindInjectable":false,"defaultScope":"Transient","skipBaseClassChecks":true},"id":0,"_bindingDictionary":{"_map":{}},"_snapshots":[],"_middleware":null,"_activations":{"_map":{}},"_deactivations":{"_map":{}},"parent":null,"_metadataReader":{},"_moduleActivationStore":{"_map":{}}}},"serverVersion":"2024.9.1","lastCaptured":{},"nextWindow":0,"eventCount":0,"workspace":{},"connectedPromise":{"scope":null,"_resolved":true,"_rejected":false,"_promise":{}},"notebooks":{},"eventName":"LANGUAGE_SERVER.REQUEST"}}, Return Value: undefined',
Error: LanguageStatusItem with id 'python.analysis.typeCheckingMode' ALREADY exists
at createLanguageStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/server/out/vs/workbench/api/node/extensionHostProcess.js:161:163942)
at Object.createLanguageStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/server/out/vs/workbench/api/node/extensionHostProcess.js:171:38483)
at _0xbcc266.createStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:275986)
at _0xbcc266.updateStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:289545)
at _0xbcc266.activate (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:273499)
at _0x31c314 (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:321112)
at _0x2858ed (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:246910)
at _0xe3bdb8._startClient (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:193154)
at _0xe3bdb8._createNewRequest (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:192675)
at _0xe3bdb8._enqueueRequestAndWaitForRun (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:191917)
at _0xe3bdb8.startClient (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:191380)
at h.start (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.python-2024.14.0-linux-x64/out/client/extension.js:2:39659)
]
2024-09-11 16:14:37.556 [error] [
'Starting language server, Class name = d, completed in 22ms, has a falsy return value, , Return Value: undefined',
Error: LanguageStatusItem with id 'python.analysis.typeCheckingMode' ALREADY exists
at createLanguageStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/server/out/vs/workbench/api/node/extensionHostProcess.js:161:163942)
at Object.createLanguageStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/server/out/vs/workbench/api/node/extensionHostProcess.js:171:38483)
at _0xbcc266.createStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:275986)
at _0xbcc266.updateStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:289545)
at _0xbcc266.activate (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:273499)
at _0x31c314 (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:321112)
at _0x2858ed (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:246910)
at _0xe3bdb8._startClient (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:193154)
at _0xe3bdb8._createNewRequest (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:192675)
at _0xe3bdb8._enqueueRequestAndWaitForRun (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:191917)
at _0xe3bdb8.startClient (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:191380)
at h.start (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.python-2024.14.0-linux-x64/out/client/extension.js:2:39659)
]
2024-09-11 16:14:37.565 [error] [
'Restarting language server, Class name = d, completed in 32ms, has a falsy return value, , Return Value: undefined',
Error: LanguageStatusItem with id 'python.analysis.typeCheckingMode' ALREADY exists
at createLanguageStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/server/out/vs/workbench/api/node/extensionHostProcess.js:161:163942)
at Object.createLanguageStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/server/out/vs/workbench/api/node/extensionHostProcess.js:171:38483)
at _0xbcc266.createStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:275986)
at _0xbcc266.updateStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:289545)
at _0xbcc266.activate (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:273499)
at _0x31c314 (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:321112)
at _0x2858ed (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:246910)
at _0xe3bdb8._startClient (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:193154)
at _0xe3bdb8._createNewRequest (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:192675)
at _0xe3bdb8._enqueueRequestAndWaitForRun (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:191917)
at _0xe3bdb8.startClient (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:191380)
at h.start (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.python-2024.14.0-linux-x64/out/client/extension.js:2:39659)
]
2024-09-11 16:14:37.565 [error] [
'Failed to restart language server, Class name = d, completed in 33ms, has a falsy return value, , Return Value: undefined',
Error: LanguageStatusItem with id 'python.analysis.typeCheckingMode' ALREADY exists
at createLanguageStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/server/out/vs/workbench/api/node/extensionHostProcess.js:161:163942)
at Object.createLanguageStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/cli/servers/Stable-4849ca9bdf9666755eb463db297b69e5385090e3/server/out/vs/workbench/api/node/extensionHostProcess.js:171:38483)
at _0xbcc266.createStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:275986)
at _0xbcc266.updateStatusItem (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:289545)
at _0xbcc266.activate (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:273499)
at _0x31c314 (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:321112)
at _0x2858ed (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:246910)
at _0xe3bdb8._startClient (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:193154)
at _0xe3bdb8._createNewRequest (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:192675)
at _0xe3bdb8._enqueueRequestAndWaitForRun (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:191917)
at _0xe3bdb8.startClient (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.vscode-pylance-2024.9.1/dist/extension.bundle.js:1:191380)
at h.start (/import/bc_users/biocomp/tboyer/.vscode-server/extensions/ms-python.python-2024.14.0-linux-x64/out/client/extension.js:2:39659)
]
2024-09-11 16:14:37.595 [debug] Extension ms-python.vscode-pylance accessed onDidChangeActiveEnvironmentPath with args: undefined
2024-09-11 16:14:37.598 [debug] Extension ms-python.vscode-pylance accessed onDidEnvironmentVariablesChange with args: undefined
2024-09-11 16:15:26.391 [debug] Found cached env for /bin/python3.9
2024-09-11 16:15:26.393 [debug] Found cached env for /bin/python3.9
The "Python Language Server" tab has no output since pylance crashed (it ends with 2024-09-11 16:14:37.725 [info] [Info - 16:14:37] Server process exited successfully
The text was updated successfully, but these errors were encountered:
I can reproduce the issue. Just run "Python Restart Language Server".
An alternative that does work is run "Developer: Restart Extension Host". This accomplishes the same thing as restarting the language server (it restarts the python extension as well).
I believe the root cause must be something in the new LSP language client that we recently updated to. It likely isn't handling shutdown correctly.
@rchiodo , this does not work for my case.
I've updated the pylance from v2024.8.2 to v2024.9.1 and file analysis is running and never completed.
I've tried to run "Python Restart Language Server" and "Developer: Restart Extension Host", but none of them worked.
Once I downgraded back to v2024.8.2 it got back to normal.
@AlexanderPodorov can you open a new issue? I'm guessing we're crashing for some reason. Restarting won't fix the crash as it will just repro over and over again.
Environment data
v2024.9.1
3.12.5
from Anaconda.Note that I remember encountering the situation of pylance being unable to restart from quite a while back (multiple vscode / pylance versions), but I can't tell the exact error(s) I've encountered before.
Repro Steps
EDIT: actually I am currently able to reproduce this very crash (same error) every time I restart pylance now.
Expected behavior
Restarted pylance.
Actual behavior
No pylance anymore.
Restarting VSCode or reloading the window fixes this issue.
Logs
"python.analysis.logLevel": "Trace"
is set in my user settings.Output of the "Python" tab
The "Python Language Server" tab has no output since pylance crashed (it ends with
2024-09-11 16:14:37.725 [info] [Info - 16:14:37] Server process exited successfully
The text was updated successfully, but these errors were encountered: