microsoft / python-language-server

Microsoft Language Server for Python
Apache License 2.0
912 stars 131 forks source link

Can not download python language server #2159

Closed finntenzor closed 3 years ago

finntenzor commented 3 years ago

Issue Type: Performance Issue

  1. Open VSCode
  2. Open any python project
  3. Download failed

It's really weird. I CAN download this file with any other tool with relatively reasonable speed(20~100KB/s, in China). But it always failed download with VSCode.

I don't think this is just a network issue. Because I can download this file normally using other tools, but this always fails in VSCode. I think it has to do with VSCode's strategy and approach to downloading files.

Message:

正在下载 https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-win-x64.0.5.59.nupkg...
语言服务器下载失败
Error: connect ETIMEDOUT 13.107.213.39:443

Extension version: 2021.7.1053846006 VS Code version: Code 1.58.2 (c3f126316369cd610563c75b1b1725e0679adfb3, 2021-07-14T22:10:15.214Z) OS version: Windows_NT x64 10.0.19042 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 7 4800HS with Radeon Graphics (16 x 2895)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.42GB (7.49GB free)| |Process Argv|D:\\Graduate\\20210722_TetxtAnalyze\\xpdf-4.03 --crash-reporter-id 696f7da9-e826-47f6-823e-53539a57b0ce| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 0 90 16708 code main 0 164 2924 gpu-process 0 42 10264 utility 0 264 14056 window (t1.py - xpdf-4.03 - Visual Studio Code [管理员]) 0 65 2880 searchService 0 14 15468 watcherService 0 11 9064 console-window-host (Windows internal process) 0 194 25420 extensionHost 0 40 1288 D:\Program\Anaconda\python.exe c:\Users\FinnTenzor\.vscode\extensions\ms-python.python-2021.7.1053846006\pythonFiles\completion.py 0 23 17108 D:\Program\Anaconda\python.exe c:\Users\FinnTenzor\.vscode\extensions\ms-python.python-2021.7.1053846006\pythonFiles\lib\python\jedi\inference\compiled\subprocess\__main__.py c:\Users\FinnTenzor\.vscode\extensions\ms-python.python-2021.7.1053846006\pythonFiles\lib\python 3.8.3 0 11 1756 console-window-host (Windows internal process) 0 11 21924 console-window-host (Windows internal process) 0 103 6204 c:\Users\FinnTenzor\.vscode\extensions\ms-vscode.cpptools-1.5.1\bin\cpptools.exe 0 101 11832 c:\Users\FinnTenzor\.vscode\extensions\ms-vscode.cpptools-1.5.1/bin/cpptools-srv.exe 6204 {19EBCF6A-9152-443D-8A6A-353B29EF2706} 0 11 15592 console-window-host (Windows internal process) 0 95 26772 c:\Users\FinnTenzor\.vscode\extensions\ms-vscode.cpptools-1.5.1/bin/cpptools-srv.exe 6204 {067A252B-22DB-4907-B428-A188D1D8C5A1} 0 93 10796 electron_node server.js 0 14 27356 D:\Program\Anaconda\python.exe c:\Users\FinnTenzor\.vscode\extensions\ms-python.python-2021.7.1053846006\pythonFiles\lib\python\debugpy\adapter 0 11 9732 console-window-host (Windows internal process) 0 87 16832 shared-process 0 67 10308 ptyHost 0 6 12612 console-window-host (Windows internal process) 0 71 24788 C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe 0 15 25988 "D:\Program\Anaconda\python.exe" c:\Users\FinnTenzor\.vscode\extensions\ms-python.python-2021.7.1053846006\pythonFiles\lib\python\debugpy\launcher 55887 -- d:\Graduate\20210722_TetxtAnalyze\xpdf-4.03\run\t1.py 0 44 1540 D:\Program\Anaconda\python.exe c:\Users\FinnTenzor\.vscode\extensions\ms-python.python-2021.7.1053846006\pythonFiles\lib\python\debugpy --connect 127.0.0.1:55886 --configure-qt none --adapter-access-token 15e51948cb304e5c2cc7348455f967f7ea1c631df6a72a3f53e2b0e380a7cc0d d:\Graduate\20210722_TetxtAnalyze\xpdf-4.03\run\t1.py 0 24 19292 crashpad-handler 0 84 27516 window (问题报告程序) ```
Workspace Info ``` | Window (t1.py - xpdf-4.03 - Visual Studio Code [管理员]) | Folder (xpdf-4.03): 602 files | File types: h(107) cc(101) make(64) obj(60) cmake(50) rsp(36) svg(31) | txt(24) cat(11) 1(10) | Conf files: cmake(50) makefile(5) launch.json(1) settings.json(1) | tasks.json(1) | Launch Configs: python cppdbg; ```
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vstes627:30244334 pythonvspyt639:30300192 pythontb:30283811 pythonvspyt551:30311712 vspre833:30321513 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscus158:30321503 pythonvsuse255:30340121 vscod805cf:30301675 pythonvspyt200:30340761 vscextlang:30333561 binariesv615:30325510 pythonvssor306cf:30340756 bridge0708:30335490 ```
karthiknadig commented 3 years ago

Thanks for your feedback! We have recently released a new and more performant language server called Pylance which likely solves these issues you are reporting.  You can download Pylance from the marketplace and install it alongside the core Python extension. Because our team's development efforts have shifted to support the new language server, we'd encourage you to try it out.

In the meantime, I'll transfer this issue over to the Microsoft Python Language Server repo for tracking. If you try out Pylance and this issue persists, you can open an issue on the pylance-release repo.

finntenzor commented 3 years ago

Thank you! I'm excited to try out Pylance.

I hadn't noticed that there was a configuration option that allowed me to select the language server.

A piece of advice for the other guys: Find "Python: Language Server" with "@ext:ms-python.python" and then select "Pylance", or Pylance will not enable (even if you install the extension). In fact, it solved my download problem immediately.