Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One error pops up "The Pylance server crashed 5 times in the last 3 minutes. The server will not be restarted. " #3126

Closed
linette-zyy opened this issue Aug 1, 2022 · 7 comments
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@linette-zyy
Copy link

Environment
Build of Visual Studio Code - Insiders: 1.70.0-insider(user setup)
Build of jupyter: v2022.7.100
Build of jupyter Notebook Renderers: v1.0.9
Build of jupyter Keymap: v1.0.0
Build of python-Pre-Release:v2022.11.12101006
Build of pylance-Pre-Release:v2022.7.43

Steps to Reproduce
1.Create a new folder on your machine
2.Open VS Code with that folder selected as the current workspace.
3.Open command palette with Ctrl+Shift+P and select 'Jupyter: Create New Blank Notebook'.
image

Actual behavior
image

Additional context and screenshots
image

Python Language Server output
python language server output.txt

Jupyterr output

Visual Studio Code - Insiders (1.70.0-insider, undefined, desktop)
Jupyter Extension Version: 2022.7.1002121024.
Python Extension Version: 2022.11.12101006.
Workspace folder c:\Users\vting\Downloads\test6
error 6:19:6.826: Exception while attempting zmq : [Error: The specified module could not be found.
\\?\c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\node_modules\zeromq\prebuilds\win32-x64\electron.napi.node
	at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
	at Object.Module._extensions..node (node:internal/modules/cjs/loader:1246:18)
	at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1812)
	at Module.load (node:internal/modules/cjs/loader:1035:32)
	at Module._load (node:internal/modules/cjs/loader:876:12)
	at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
	at Function.r._load (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:14538)
	at Function.b._load (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:62507)
	at Function.v._load (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:61875)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at p (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\loader.js:4:699)
	at load (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\node_modules\node-gyp-build\index.js:1:628)
	at Object.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\node_modules\zeromq\lib\native.js:1:198)
	at Module.u._compile (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\loader.js:4:1313)
	at Object.Module._extensions..js (node:internal/modules/cjs/loader:1216:10)
	at Module.load (node:internal/modules/cjs/loader:1035:32)
	at Module._load (node:internal/modules/cjs/loader:876:12)
	at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
	at Function.r._load (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:14538)
	at Function.b._load (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:62507)
	at Function.v._load (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:61875)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at p (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\loader.js:4:699)
	at Object.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\node_modules\zeromq\lib\index.js:1:144)
	at Module.u._compile (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\loader.js:4:1313)
	at Object.Module._extensions..js (node:internal/modules/cjs/loader:1216:10)
	at Module.load (node:internal/modules/cjs/loader:1035:32)
	at Module._load (node:internal/modules/cjs/loader:876:12)
	at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
	at Function.r._load (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:111:14538)
	at Function.b._load (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:62507)
	at Function.v._load (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:61875)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at p (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\loader.js:4:699)
	at Object.92747 (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\extension.node.js:17:488997)
	at __webpack_require__ (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\extension.node.js:17:1368123)
	at l.zmqSupported (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\extension.node.js:2:2323456)
	at l.isSupportedForLocalLaunch (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\extension.node.js:2:2323199)
	at l.get isSupported [as isSupported] (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\extension.node.js:2:2323109)
	at t.registerTypes (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\extension.node.js:2:2337638)
	at c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\extension.node.js:17:1373617
	at c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\extension.node.js:17:1374372
	at c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\extension.node.js:17:1374380
	at e.activate (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.7.1002121024\out\extension.node.js:17:1374502)
	at Function._callActivateOptional (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:17473)
	at Function._callActivate (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:17131)
	at c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:14942
	at async v._activate (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:85:8180)
	at async v._waitForDepsThenActivate (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:85:8122)
	at async v._initialize (c:\Users\vting\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:85:7486)] {
  code: 'ERR_DLOPEN_FAILED'
}
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 6:19:7.400: LSP Notebooks experiment is enabled
info 6:19:7.444: Preferred Remote kernel for Untitled-1.ipynb is undefined
info 6:19:7.444: Find preferred kernel for Untitled-1.ipynb with metadata {"orig_nbformat":4} & preferred interpreter 
info 6:19:7.445: Preferred Remote kernel for Untitled-1.ipynb is undefined
info 6:19:7.617: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
info 6:19:10.416: Process Execution: > c:\ProgramData\Anaconda3\python.exe -c "import jupyter"
> c:\ProgramData\Anaconda3\python.exe -c "import jupyter"
info 6:19:10.419: Process Execution: > c:\ProgramData\Anaconda3\python.exe -c "import notebook"
> c:\ProgramData\Anaconda3\python.exe -c "import notebook"
info 6:19:10.691: Process Execution: > c:\ProgramData\Anaconda3\python.exe -m jupyter kernelspec --version
> c:\ProgramData\Anaconda3\python.exe -m jupyter kernelspec --version
info 6:19:11.467: Preferred Remote kernel for Untitled-1.ipynb is undefined
info 6:19:11.467: Find preferred kernel for Untitled-1.ipynb with metadata {"orig_nbformat":4} & preferred interpreter 
info 6:19:11.468: Preferred Remote kernel for Untitled-1.ipynb is undefined
info 6:19:11.476: Preferred Remote kernel for Untitled-1.ipynb is undefined
info 6:19:11.486: Process Execution: > c:\Program Files\Python310\python.exe -m pip list
> c:\Program Files\Python310\python.exe -m pip list

@linette-zyy linette-zyy added the bug Something isn't working label Aug 1, 2022
@amunger amunger removed bug Something isn't working triage-needed labels Aug 1, 2022
@amunger amunger transferred this issue from microsoft/vscode-jupyter Aug 1, 2022
@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Aug 2, 2022
@heejaechang heejaechang added the needs investigation Could be an issue - needs investigation label Aug 2, 2022
@heejaechang
Copy link
Contributor

it looks like there is a bug around untitled.ipynb with LSP experimentation on.

repro steps are

  1. set "python.pylanceLspNotebooksEnabled": true
  2. make sure no folder is opened.
  3. from menu, file -> new file ->jupyter notebook

@heejaechang heejaechang added bug Something isn't working and removed needs investigation Could be an issue - needs investigation labels Aug 3, 2022
@mesic
Copy link

mesic commented Aug 4, 2022

it looks like there is a bug around untitled.ipynb with LSP experimentation on.

repro steps are

  1. set "python.pylanceLspNotebooksEnabled": true
  2. make sure no folder is opened.
  3. from menu, file -> new file ->jupyter notebook

Just to add to this: as a quick fix, given that you do not need the LSP experimental mode, is to turn it off.

@heejaechang heejaechang self-assigned this Aug 4, 2022
@luabud
Copy link
Member

luabud commented Aug 4, 2022

FWIW I have just been able to reproduce this by creating a new untitled notebook with a folder open in VS Code.
pylancenotebookbuglogs.txt

@torext
Copy link

torext commented Aug 5, 2022

Having the same issue. Setting python.pylanceLspNotebooksEnabled to false did resolve the issue for now, but then I start getting duplicate suggestions from IntelliSense in .py files after having opened and run a Jupyter notebook. Setting additionally jupyter.pylanceHandlesNotebooks to false gets rid of those duplicates as well and makes things usable for me again.

@carolinehaoud
Copy link

i have the same issue

@davisclarke
Copy link

Having the same issue. Setting python.pylanceLspNotebooksEnabled to false did resolve the issue for now, but then I start getting duplicate suggestions from IntelliSense in .py files after having opened and run a Jupyter notebook. Setting additionally jupyter.pylanceHandlesNotebooks to false gets rid of those duplicates as well and makes things usable for me again.

This resolves the issue I had for now. Pylance loads properly for me with python.pylanceLspNotebooksEnabled set to true, as long as I do not have an unsaved Untitled.ipynb open.

@heejaechang heejaechang added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Aug 6, 2022
@heejaechang
Copy link
Contributor

This issue has been fixed in version 2022.8.12, which we've just released. You can find the changelog here: CHANGELOG.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

12 participants