microsoft / python-language-server

Microsoft Language Server for Python
Apache License 2.0
910 stars 130 forks source link

Error in vscode pylance output: `Stack overflow. Connection to server got closed. Server will not be restarted.` #2155

Closed KestutisMa closed 3 years ago

KestutisMa commented 3 years ago

Windows 10, Latest vscode (1.57.1), pylance v2021.6.3

Expected behaviour

No error

Actual behaviour

Error after just started vscode: The Python Tools server crashed 5 times in the last 3 minutes. The server will not be restarted.

Logs

Python Language Server Log


[Info  - 1:06:52 PM] Microsoft Python Language Server version 0.5.59.0
[Info  - 1:06:52 PM] Workspace root: c:\OpenGL\processExpPy
[Info  - 1:08:28 PM] GetCurrentSearchPaths C:\Miniconda3\envs\openGLenv\python.exe 
[Info  - 1:08:28 PM] Interpreter search paths:
[Info  - 1:08:28 PM]     c:\miniconda3\envs\openglenv\dlls
[Info  - 1:08:28 PM]     c:\miniconda3\envs\openglenv\lib
[Info  - 1:08:28 PM]     c:\miniconda3\envs\openglenv
[Info  - 1:08:28 PM]     c:\users\kestutis\appdata\roaming\python\python37\site-packages
[Info  - 1:08:28 PM]     c:\miniconda3\envs\openglenv\lib\site-packages
[Info  - 1:08:28 PM]     c:\miniconda3\envs\openglenv\lib\site-packages\locket-0.2.1-py3.7.egg
[Info  - 1:08:28 PM]     c:\miniconda3\envs\openglenv\lib\site-packages\win32
[Info  - 1:08:28 PM]     c:\miniconda3\envs\openglenv\lib\site-packages\win32\lib
[Info  - 1:08:28 PM]     c:\miniconda3\envs\openglenv\lib\site-packages\pythonwin
[Info  - 1:08:28 PM] User search paths:
[Info  - 1:08:34 PM] Initializing for C:\Miniconda3\envs\openGLenv\python.exe
[Info  - 1:08:34 PM] Analysis caching mode: None.
Stack overflow.
[Error - 1:08:46 PM] Connection to server got closed. Server will not be restarted.
jakebailey commented 3 years ago

These are logs for the old language server, not Pylance. Can you check your settings and change your language server setting to Pylance or Default?

RazerMoon commented 3 years ago

@jakebailey Couldn't find how to fix this issue, turns out I was using the legacy server. Thank you!

KestutisMa commented 3 years ago

Thank you, default setting was Microsoft sever.