简体   繁体   中英

How to solve pylance server crashing in VS Code?

Beginner here in coding/programming.

I'm doing the MOOC from Helsinki University. Using VS Code and the TMC plugin is a must because I admit my solutions through it.

Pylance server keeps on crashing every few days. I can't find a solution for it. Sometimes it works back without any intervention from me. But this time it has been not working since few days.

I copied the output into a google docs document since it's very long: error output

Could you please help me solve this issue? I'm using an M1 Macbook Air in case it makes a difference.

Thank you

I had also problems with VS Code pylance server crashing with MOOC exercises. I noticed that it happens when I have lots of exercise files open which I had already done. After a while when you do more and more exercises and write code in lots of different files, pylance server will crash every time. After I closed already done exercises in TMC plugin all seems to work fine. I think that there is a limit how many files pylance server can handle in same workspace.

[Warn - 4:28:20 PM] (4592) stubPath /Users/karim/Library/Application Support/tmc/vscode/mooc-programming-22/part04-01_hello_visual_studio_code/typings is not a valid directory.

In VS Code settings, look for python.analysis.stubPath and set it to "" instead of "typings".

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM