Skip to content

The Python Tools server crashed 5 times in the last 3 minutes. The server will not be restarted. #13679

Closed

Description

@Kri-Ol

Happens on Python notebook, Python interactive file (with #%% in many places) as well as just plain Python file.

Version: 1.48.2 (system setup)
Commit: a0479759d6e9ea56afa657e454193f72aef85bd0
Date: 2020-08-25T10:13:11.295Z (4 days ago)
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041

Extensions:

ms-python.python-2020.8.105045
ms-python.gather-2020.7.2
ms-python.vscode-pylance-2020.8.3

Activity

  1. added
    triage-neededNeeds assignment to the proper sub-team
    bugIssue identified by VS Code Team member as probable bug
    on Aug 30, 2020
  2. mrbell321 commented on Aug 31, 2020

    @mrbell321

    I am also getting this error.

  3. karthiknadig commented on Aug 31, 2020

    @karthiknadig
    Member

    Looks like you might have a bad update. Do the following to remove stale versions of the extension:

    1. Uninstall Python extension (if you have pylance uninstall it first).
    2. Close all instances of VS Code.
    3. Go to, %USERPROFILE%/.vscode/extensions (on windows) or ~/.vscode/extensions on Linux/Mac.
    4. Delete any folder with the name starting with ms-python.python*
    5. Start VS Code, and install Python extension (also pylance if you uninstalled it in step 1).
  4. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Aug 31, 2020
  5. Kri-Ol commented on Aug 31, 2020

    @Kri-Ol
    Author

    Reinstallation of all extensions fixed it

  6. mrbell321 commented on Sep 1, 2020

    @mrbell321

    Same here. Thanks.

    edit: I realized that wasn't quite explicit. Reinstallation of extensions fixed it for me.

  7. karthiknadig commented on Sep 1, 2020

    @karthiknadig
    Member

    Thank you, for letting us know.

  8. ghost removed on Sep 1, 2020
  9. yurenchen000 commented on May 26, 2021

    @yurenchen000

    Encountered similar problem,
     re-install Python and Pylance extension fixed.

  10. austinpark77 commented on Jun 8, 2021

    @austinpark77

    Uninstall and reinstall (following the steps above) didn't work for me.

    ms-python.python v2021.5.842923320 is still crashing and printing the error above. I'm working with the Remote - SSH package.

  11. chaitanya-khandare commented on Jun 10, 2021

    @chaitanya-khandare

    Looks like you might have a bad update. Do the following to remove stale versions of the extension:

    1. Uninstall Python extension (if you have pylance uninstall it first).
    2. Close all instances of VS Code.
    3. Go to, %USERPROFILE%/.vscode/extensions (on windows) or ~/.vscode/extensions on Linux/Mac.
    4. Delete any folder with the name starting with ms-python.python*
    5. Start VS Code, and install Python extension (also pylance if you uninstalled it in step 1).

    hey man, A BIG THANK YOU THANK YOU THANK YOU. It Really WORKS !!!!!!!!!!!!!!!!!!!!!!!!!

  12. nsbruce commented on Jun 15, 2021

    @nsbruce

    Any progress Austin Park (@austinpark77) ? I've been having the same problem for about 2 weeks and completely deleting the remote .vscode folder then reconnecting and reinstalling the python extension hasn't fixed it at all.

  13. austinpark77 commented on Jun 21, 2021

    @austinpark77

    I was OOO for the last week, so I didn't try anything. Today I updated to the most recent version of VS Code (v1.57) and Python Extension (v2021.6.944021595), ssh'd in, and it was working as expected. This probably isn't too helpful, but fingers crossed the update fixes your issues too.

  14. nsbruce commented on Jun 21, 2021

    @nsbruce

    It seems to be working now for me as well.

  15. KayvanShah1 commented on Jun 22, 2021

    @KayvanShah1

    None of the solutions are working. Tried uninstalling the extensions and deleting appropriate folder from .vscode. But the language server keeps crashing.

    Is there any other solution out there other than waiting for next update and hope that fixes the issue.

  16. karthiknadig commented on Jun 22, 2021

    @karthiknadig
    Member

    Kayvan Shah (@KayvanShah1) File a separate bug with details specific to our scenario. That will help us direct you better.

  17. adriangzz commented on Jun 23, 2021

    @adriangzz

    Downgrading to version 2021.5.842923320 fixed the issue for me.

  18. Moh-Snoussi commented on Jun 24, 2021

    @Moh-Snoussi

    File -> Preferences -> Settings -> Extensions -> Python -> "Python: Language Server".
    or search for it in settings "Python: Language Server" .
    change it to Pylance

  19. akhilravipati97 commented on Jun 29, 2021

    @akhilravipati97

    File -> Preferences -> Settings -> Extensions -> Python -> "Python: Language Server".
    or search for it in settings "Python: Language Server" .
    change it to Pylance

    I was working on a remote machine using Remote - SSH.
    Setting the language server to pylance fixed it for me.

  20. drelyea-blackberry commented on Jul 2, 2021

    @drelyea-blackberry

    Changing the language server to Pylance fixed things, but dear god do I hate the color scheme. Why do we need to have this as Pylance?

  21. luisccomp commented on Jul 12, 2021

    @luisccomp

    That doesn't work for me. When I check the language server output, I got a stack overflow error when I try to use numpy functions. If a source code file contains import numpy as np, the language server fails.

  22. luisccomp commented on Jul 12, 2021

    @luisccomp

    This is the output of language sercer currently installed on my PC.

    Stack overflow.
    [Info  - 17:43:09] Connection to server got closed. Server will restart.
    [Info  - 17:43:10] Analysis cache path: C:\Users\Chuno\AppData\Local\Microsoft\Python Language Server
    [Info  - 17:43:10] Microsoft Python Language Server version 0.5.59.0
    [Info  - 17:43:10] Workspace root: d:\Users\Chuno\Documentos\Projetos\opencv-course
    [Info  - 17:43:10] GetCurrentSearchPaths d:\Users\Chuno\Documentos\Projetos\opencv-course\venv\Scripts\python.exe 
    [Info  - 17:43:10] Interpreter search paths:
    [Info  - 17:43:10]     c:\users\chuno\appdata\local\programs\python\python38\dlls
    [Info  - 17:43:10]     c:\users\chuno\appdata\local\programs\python\python38\lib
    [Info  - 17:43:10]     c:\users\chuno\appdata\local\programs\python\python38
    [Info  - 17:43:10]     d:\users\chuno\documentos\projetos\opencv-course\venv
    [Info  - 17:43:10]     d:\users\chuno\documentos\projetos\opencv-course\venv\lib\site-packages
    [Info  - 17:43:10] User search paths:
    [Info  - 17:43:11] Initializing for d:\Users\Chuno\Documentos\Projetos\opencv-course\venv\Scripts\python.exe
    [Info  - 17:43:11] Analysis caching mode: None.
    Stack overflow.
    [Error - 17:43:17] Connection to server got closed. Server will not be restarted.
    
  23. KayvanShah1 commented on Jul 12, 2021

    @KayvanShah1

    Changing the language server solves the issues permanently

  24. martingale commented on Jul 20, 2021

    @martingale

    Adding the line "python.languageServer": "Pylance" to the file .vscode/settings.json solved the issue for me.

  25. locked as resolved and limited conversation to collaborators on Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions