vscode-jupyter: Kernel Crashes with

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

After running a cell that raised a a Python error while constructing a Keras model, re-running the cell crashes the kernel and has other undesired effects.

After the crash, all cells are surrounded by white (see image below.) This renders all output text invisible. ~VSCode needs to restar~ The notebook needs to be closed and reopened to solve the white border issue. An error message below the cell that caused the crash reads:

Error: Canceled future for execute_request message before replies were done
at a.KernelShellFutureHandler.dispose (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:32353)
at /home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:26572
at Map.forEach (<anonymous>)
at y._clearKernelState (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:26557)
at /home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:29000
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Somewhat oddly, this also causes my desktop Slack client to move to a blank window. Slack > History > Back twice fixes this.

White border on cells:

Screenshot from 2022-04-19 09-39-37

VS Code Version

Version: 1.66.2 Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977 Date: 2022-04-11T07:49:24.808Z Electron: 17.2.0 Chromium: 98.0.4758.109 Node.js: 16.13.0 V8: 9.8.177.11-electron.0 OS: Linux x64 5.13.0-7614-generic snap

Jupyter Extension Version

v2022.3.1000901801

Jupyter logs

Visual Studio Code (1.66.2, undefined, desktop)
Jupyter Extension Version: 2022.3.1000901801.
Python Extension Version: 2022.4.1.
Workspace folder ~/Repos/neo-mp
Error 10:49:38: Exception while attempting zmq : [Error: /snap/core/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/zeromq/prebuilds/linux-x64/electron.napi.glibc.node)
	at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1800)
	at Object.Module._extensions..node (node:internal/modules/cjs/loader:1246:18)
	at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1800)
	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:13331)
	at Function.i._load (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104:32156)
	at Function.E._load (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104:28749)
	at Function.g._load (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:61429)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at h (/snap/code/94/usr/share/code/resources/app/out/vs/loader.js:4:699)
	at load (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/node-gyp-build/index.js:1:605)
	at Object.<anonymous> (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/zeromq/lib/native.js:1:198)
	at Module.u._compile (/snap/code/94/usr/share/code/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:13331)
	at Function.i._load (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104:32156)
	at Function.E._load (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104:28749)
	at Function.g._load (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:61429)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at h (/snap/code/94/usr/share/code/resources/app/out/vs/loader.js:4:699)
	at Object.<anonymous> (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/zeromq/lib/index.js:1:144)
	at Module.u._compile (/snap/code/94/usr/share/code/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:13331)
	at Function.i._load (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104:32156)
	at Function.E._load (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104:28749)
	at Function.g._load (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:99:61429)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at h (/snap/code/94/usr/share/code/resources/app/out/vs/loader.js:4:699)
	at Object.92747 (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:3851668)
	at __webpack_require__ (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:4533298)
	at u.zmqSupported (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:535364)
	at u.isSupportedForLocalLaunch (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:535107)
	at u.get isSupported [as isSupported] (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:535017)
	at t.registerTypes (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:545810)
	at /home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:4537617
	at /home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:4538435
	at /home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:4538443
	at e.activate (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:4538565)
	at Function._callActivateOptional (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:16070)
	at Function._callActivate (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:15731)
	at /snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:90:13549
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async g._activate (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:8154)
	at async g._waitForDepsThenActivate (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:8096)
	at async g._initialize (/snap/code/94/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:7460)] {
  code: 'ERR_DLOPEN_FAILED'
}
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
Info 10:49:38: Old kernelspecs (created by Jupyter extension) stored in directory /home/lenhart/.local/share/jupyter/kernels/__old_vscode_kernelspecs
Info 10:49:38: Attempting to start a server because of preload conditions ...
Info 10:49:38: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
Info 10:49:38: Creating controller for jupyter-notebook with interpreter ~/anaconda3/bin/python
Info 10:49:39: Checking for server existence.
Info 10:49:39: Checking for server existence.
Info 10:49:39: Checking for server usability.
Info 10:49:39: Starting notebook server.
Info 10:49:39: Checking for server usability.
Info 10:49:39: Connecting to server
Info 10:49:39: Connecting to process server
Info 10:49:39: Connecting server kernel http://127.0.0.1:8888/
Connecting to Jupyter server at http://127.0.0.1:8888/
Info 10:49:39: Creating server with settings : {"baseUrl":"http://127.0.0.1:8888/","appUrl":"","wsUrl":"ws://127.0.0.1:8888/","token":"d76de070289c91ffd4a75cfbf287e31e24e4bff23d3ce157","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 10:49:39: Connection complete server
Info 10:49:39: Server started.
Info 10:49:39: Creating server with settings : {"baseUrl":"http://127.0.0.1:8888/","appUrl":"","wsUrl":"ws://127.0.0.1:8888/","token":"d76de070289c91ffd4a75cfbf287e31e24e4bff23d3ce157","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 10:49:39: Disposing session manager
Info 10:49:39: SessionManager - dispose contents manager
Info 10:49:39: ShutdownSessionAndConnection - dispose session manager
Info 10:49:39: Finished disposing jupyter session manager
Info 10:49:39: Creating server with settings : {"baseUrl":"http://127.0.0.1:8888/","appUrl":"","wsUrl":"ws://127.0.0.1:8888/","token":"d76de070289c91ffd4a75cfbf287e31e24e4bff23d3ce157","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 10:49:39: Creating server with settings : {"baseUrl":"http://127.0.0.1:8888/","appUrl":"","wsUrl":"ws://127.0.0.1:8888/","token":"d76de070289c91ffd4a75cfbf287e31e24e4bff23d3ce157","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 10:49:39: Setting setActiveController for ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_5.ipynb
Info 10:49:39: Disposing session manager
Info 10:49:39: SessionManager - dispose contents manager
Info 10:49:39: ShutdownSessionAndConnection - dispose session manager
Info 10:49:39: Finished disposing jupyter session manager
Info 10:49:39: Creating server with settings : {"baseUrl":"http://127.0.0.1:8888/","appUrl":"","wsUrl":"ws://127.0.0.1:8888/","token":"d76de070289c91ffd4a75cfbf287e31e24e4bff23d3ce157","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 10:49:39: Disposing session manager
Info 10:49:39: SessionManager - dispose contents manager
Info 10:49:39: ShutdownSessionAndConnection - dispose session manager
Info 10:49:39: Finished disposing jupyter session manager
Info 10:49:39: Disposing session manager
Info 10:49:39: SessionManager - dispose contents manager
Info 10:49:39: ShutdownSessionAndConnection - dispose session manager
Info 10:49:39: Finished disposing jupyter session manager
Info 10:49:39: Find preferred kernel for ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_5.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"}} & preferred interpreter 
Info 10:49:39: Preferred Remote kernel for ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_5.ipynb is d3d678be-f5c3-4735-9742-4110f5d20593
Info 10:49:39: PreferredConnection: d3d678be-f5c3-4735-9742-4110f5d20593 found for NotebookDocument: ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_5.ipynb
Info 10:49:39: TargetController found ID: d3d678be-f5c3-4735-9742-4110f5d20593 for document ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_5.ipynb
Info 10:49:39: Setting controller affinity for ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_5.ipynb d3d678be-f5c3-4735-9742-4110f5d20593
Info 10:49:39: KernelProvider switched kernel to id = d3d678be-f5c3-4735-9742-4110f5d20593
Info 10:49:39: Process Execution: > ~/anaconda3/bin/python -c "import notebook"
> ~/anaconda3/bin/python -c "import notebook"
Info 10:49:39: Process Execution: > ~/anaconda3/bin/python -m pip list
> ~/anaconda3/bin/python -m pip list
Info 10:49:40: Process Execution: > ~/anaconda3/bin/python -c "import jupyter"
> ~/anaconda3/bin/python -c "import jupyter"
Info 10:49:40: Got activated conda env vars ourselves for ~/anaconda3/bin/python in 1294
Info 10:49:40: Process Execution: > ~/anaconda3/bin/python -m jupyter kernelspec --version
> ~/anaconda3/bin/python -m jupyter kernelspec --version
Info 10:49:40: Starting notebook server.
Info 10:49:40: Connecting to server
Info 10:49:40: Launching server
Info 10:49:40: Starting Notebook
Info 10:49:40: Generating custom default config at /tmp/d8946e8a-1951-441d-90d7-87b2dbebd651/jupyter_notebook_config.py
Info 10:49:40: Starting Jupyter Notebook
Starting Jupyter from ~/anaconda3/bin/python with command line --no-browser --notebook-dir="/home/lenhart/Repos/neo-mp" --KernelManager.autorestart=False --config=/tmp/d8946e8a-1951-441d-90d7-87b2dbebd651/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
Info 10:49:40: Creating daemon pool for ~/anaconda3/bin/python with env variables count 96
Info 10:49:40: Process Execution: > ~/anaconda3/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 664422
> ~/anaconda3/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 664422
Info 10:49:40: Process Execution: > ~/anaconda3/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 664422
> ~/anaconda3/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 664422
Info 10:49:40: Process Execution: > ~/anaconda3/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 664422
> ~/anaconda3/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 664422
Info 10:49:40: Process Execution: > ~/anaconda3/bin/python (daemon) -m jupyter notebook --no-browser --notebook-dir="/home/lenhart/Repos/neo-mp" --KernelManager.autorestart=False --config=/tmp/d8946e8a-1951-441d-90d7-87b2dbebd651/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
> ~/anaconda3/bin/python (daemon) -m jupyter notebook --no-browser --notebook-dir="/home/lenhart/Repos/neo-mp" --KernelManager.autorestart=False --config=/tmp/d8946e8a-1951-441d-90d7-87b2dbebd651/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
Info 10:49:40: Waiting for Jupyter Notebook
/home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
Info 10:49:40: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(

[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.
Info 10:49:41: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.

[I 10:49:41.203 NotebookApp] The port 8889 is already in use, trying another port.
Info 10:49:41: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.
[I 10:49:41.203 NotebookApp] The port 8889 is already in use, trying another port.

[I 10:49:41.260 NotebookApp] JupyterLab extension loaded from /home/lenhart/anaconda3/lib/python3.8/site-packages/jupyterlab
Info 10:49:41: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.
[I 10:49:41.203 NotebookApp] The port 8889 is already in use, trying another port.
[I 10:49:41.260 NotebookApp] JupyterLab extension loaded from /home/lenhart/anaconda3/lib/python3.8/site-packages/jupyterlab

[I 10:49:41.260 NotebookApp] JupyterLab application directory is /home/lenhart/anaconda3/share/jupyter/lab
Info 10:49:41: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.
[I 10:49:41.203 NotebookApp] The port 8889 is already in use, trying another port.
[I 10:49:41.260 NotebookApp] JupyterLab extension loaded from /home/lenhart/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 10:49:41.260 NotebookApp] JupyterLab application directory is /home/lenhart/anaconda3/share/jupyter/lab

[I 10:49:41.262 NotebookApp] Serving notebooks from local directory: /home/lenhart/Repos/neo-mp
Info 10:49:41: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.
[I 10:49:41.203 NotebookApp] The port 8889 is already in use, trying another port.
[I 10:49:41.260 NotebookApp] JupyterLab extension loaded from /home/lenhart/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 10:49:41.260 NotebookApp] JupyterLab application directory is /home/lenhart/anaconda3/share/jupyter/lab
[I 10:49:41.262 NotebookApp] Serving notebooks from local directory: /home/lenhart/Repos/neo-mp

[I 10:49:41.262 NotebookApp] Jupyter Notebook 6.1.4 is running at:
Info 10:49:41: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.
[I 10:49:41.203 NotebookApp] The port 8889 is already in use, trying another port.
[I 10:49:41.260 NotebookApp] JupyterLab extension loaded from /home/lenhart/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 10:49:41.260 NotebookApp] JupyterLab application directory is /home/lenhart/anaconda3/share/jupyter/lab
[I 10:49:41.262 NotebookApp] Serving notebooks from local directory: /home/lenhart/Repos/neo-mp
[I 10:49:41.262 NotebookApp] Jupyter Notebook 6.1.4 is running at:

[I 10:49:41.262 NotebookApp] http://localhost:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d
Info 10:49:41: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.
[I 10:49:41.203 NotebookApp] The port 8889 is already in use, trying another port.
[I 10:49:41.260 NotebookApp] JupyterLab extension loaded from /home/lenhart/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 10:49:41.260 NotebookApp] JupyterLab application directory is /home/lenhart/anaconda3/share/jupyter/lab
[I 10:49:41.262 NotebookApp] Serving notebooks from local directory: /home/lenhart/Repos/neo-mp
[I 10:49:41.262 NotebookApp] Jupyter Notebook 6.1.4 is running at:
[I 10:49:41.262 NotebookApp] http://localhost:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d

Info 10:49:41: Process Execution: > ~/anaconda3/bin/python (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/pythonFiles/vscode_datascience_helpers/getServerInfo.py
> ~/anaconda3/bin/python (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/pythonFiles/vscode_datascience_helpers/getServerInfo.py
[I 10:49:41.262 NotebookApp]  or http://127.0.0.1:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d
Info 10:49:41: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.
[I 10:49:41.203 NotebookApp] The port 8889 is already in use, trying another port.
[I 10:49:41.260 NotebookApp] JupyterLab extension loaded from /home/lenhart/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 10:49:41.260 NotebookApp] JupyterLab application directory is /home/lenhart/anaconda3/share/jupyter/lab
[I 10:49:41.262 NotebookApp] Serving notebooks from local directory: /home/lenhart/Repos/neo-mp
[I 10:49:41.262 NotebookApp] Jupyter Notebook 6.1.4 is running at:
[I 10:49:41.262 NotebookApp] http://localhost:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d
[I 10:49:41.262 NotebookApp]  or http://127.0.0.1:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d

Info 10:49:41: Process Execution: > ~/anaconda3/bin/python (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/pythonFiles/vscode_datascience_helpers/getServerInfo.py
> ~/anaconda3/bin/python (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/pythonFiles/vscode_datascience_helpers/getServerInfo.py
[I 10:49:41.262 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Info 10:49:41: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.
[I 10:49:41.203 NotebookApp] The port 8889 is already in use, trying another port.
[I 10:49:41.260 NotebookApp] JupyterLab extension loaded from /home/lenhart/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 10:49:41.260 NotebookApp] JupyterLab application directory is /home/lenhart/anaconda3/share/jupyter/lab
[I 10:49:41.262 NotebookApp] Serving notebooks from local directory: /home/lenhart/Repos/neo-mp
[I 10:49:41.262 NotebookApp] Jupyter Notebook 6.1.4 is running at:
[I 10:49:41.262 NotebookApp] http://localhost:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d
[I 10:49:41.262 NotebookApp]  or http://127.0.0.1:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d
[I 10:49:41.262 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

[C 10:49:41.265 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/lenhart/.local/share/jupyter/runtime/nbserver-664711-open.html
    Or copy and paste one of these URLs:
        http://localhost:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d
     or http://127.0.0.1:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d
Info 10:49:41: /home/lenhart/anaconda3/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/lenhart/Repos/neo-mp' instead of '"/home/lenhart/Repos/neo-mp"' – or use CUnicode.
  warn(
[I 10:49:41.203 NotebookApp] The port 8888 is already in use, trying another port.
[I 10:49:41.203 NotebookApp] The port 8889 is already in use, trying another port.
[I 10:49:41.260 NotebookApp] JupyterLab extension loaded from /home/lenhart/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 10:49:41.260 NotebookApp] JupyterLab application directory is /home/lenhart/anaconda3/share/jupyter/lab
[I 10:49:41.262 NotebookApp] Serving notebooks from local directory: /home/lenhart/Repos/neo-mp
[I 10:49:41.262 NotebookApp] Jupyter Notebook 6.1.4 is running at:
[I 10:49:41.262 NotebookApp] http://localhost:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d
[I 10:49:41.262 NotebookApp]  or http://127.0.0.1:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d
[I 10:49:41.262 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 10:49:41.265 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/lenhart/.local/share/jupyter/runtime/nbserver-664711-open.html
    Or copy and paste one of these URLs:
        http://localhost:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d
     or http://127.0.0.1:8890/?token=2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d

Info 10:49:41: Connecting to process server
Info 10:49:41: Connecting server kernel http://localhost:8890/
Info 10:49:41: Creating server with settings : {"baseUrl":"http://localhost:8890/","appUrl":"","wsUrl":"ws://localhost:8890/","token":"2e90816d22ff3ce4a348b6387ec9bf89d2c4bd84f583851d","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 10:49:41: Connection complete server
Info 10:49:41: Server started.
Info 10:49:41: Process Execution: > ~/anaconda3/bin/python (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/pythonFiles/vscode_datascience_helpers/getServerInfo.py
> ~/anaconda3/bin/python (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/pythonFiles/vscode_datascience_helpers/getServerInfo.py
Info 10:49:41: Process Execution: > ~/anaconda3/bin/python (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/pythonFiles/vscode_datascience_helpers/getServerInfo.py
> ~/anaconda3/bin/python (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/pythonFiles/vscode_datascience_helpers/getServerInfo.py
Info 10:49:54: Attempting to start a server because of preload conditions ...
Info 10:49:54: Setting setActiveController for ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:49:54: Creating controller for jupyter-notebook with interpreter ~/anaconda3/bin/python
Info 10:49:54: Creating server with settings : {"baseUrl":"http://127.0.0.1:8888/","appUrl":"","wsUrl":"ws://127.0.0.1:8888/","token":"d76de070289c91ffd4a75cfbf287e31e24e4bff23d3ce157","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 10:49:54: Disposing session manager
Info 10:49:54: SessionManager - dispose contents manager
Info 10:49:54: ShutdownSessionAndConnection - dispose session manager
Info 10:49:54: Finished disposing jupyter session manager
Info 10:49:54: Creating server with settings : {"baseUrl":"http://127.0.0.1:8888/","appUrl":"","wsUrl":"ws://127.0.0.1:8888/","token":"d76de070289c91ffd4a75cfbf287e31e24e4bff23d3ce157","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 10:49:54: Disposing session manager
Info 10:49:54: SessionManager - dispose contents manager
Info 10:49:54: ShutdownSessionAndConnection - dispose session manager
Info 10:49:54: Finished disposing jupyter session manager
Info 10:49:54: Find preferred kernel for ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.10"}} & preferred interpreter 
Info 10:49:54: Preferred Remote kernel for ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb is 93a821e5-28ae-47b6-88bc-08a33c7c26e6
Info 10:49:54: PreferredConnection: 93a821e5-28ae-47b6-88bc-08a33c7c26e6 found for NotebookDocument: ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:49:54: TargetController found ID: 93a821e5-28ae-47b6-88bc-08a33c7c26e6 for document ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:49:54: Setting controller affinity for ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb 93a821e5-28ae-47b6-88bc-08a33c7c26e6
Info 10:49:54: KernelProvider switched kernel to id = 93a821e5-28ae-47b6-88bc-08a33c7c26e6
Info 10:58:28: Execute Cells request 0, 2, 3, 5, 6, 7, 8, 9, 10, 13, 14, 15, 17, 18, 19, 20, 21
Info 10:58:28: Execute Cell 0 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Starting Notebook in kernel.ts id = 93a821e5-28ae-47b6-88bc-08a33c7c26e6 for ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 2 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 3 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 5 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 6 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 7 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 8 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 9 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 10 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 13 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 14 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 15 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 17 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 18 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 19 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 20 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Execute Cell 21 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:58:28: Started session for kernel 93a821e5-28ae-47b6-88bc-08a33c7c26e6
Info 10:58:28: Finished connecting kernel 93a821e5-28ae-47b6-88bc-08a33c7c26e6
http://127.0.0.1:8888/: Creating new notebook 
Info 10:58:28: Creating server with settings : {"baseUrl":"http://127.0.0.1:8888/","appUrl":"","wsUrl":"ws://127.0.0.1:8888/","token":"d76de070289c91ffd4a75cfbf287e31e24e4bff23d3ce157","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 10:58:28: Updating preferred kernel for remote notebook 93a821e5-28ae-47b6-88bc-08a33c7c26e6
Info 10:58:28: Storing Preferred remote kernel for ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb is 93a821e5-28ae-47b6-88bc-08a33c7c26e6
Info 10:58:28: Disposing session manager
Info 10:58:28: SessionManager - dispose contents manager
Info 10:58:28: ShutdownSessionAndConnection - dispose session manager
Info 10:58:28: Finished disposing jupyter session manager
Info 10:58:28: Cell 0 executed with state Success
Info 10:58:33: Cell 2 executed with state Success
Info 10:58:33: Cell 3 executed with state Success
Info 10:58:33: Cell 5 executed with state Success
Info 10:58:33: Cell 6 executed with state Success
Info 10:58:33: Cell 7 executed with state Success
Info 10:58:33: Cell 8 executed with state Success
Info 10:58:33: Cell 9 executed with state Success
Info 10:58:33: Cell 10 executed with state Success
Info 10:58:33: Cell 13 executed with state Success
Info 10:58:34: Cell 14 executed with state Success
Info 10:58:38: Cell 15 executed with state Success
Info 10:58:38: Cell 17 executed with state Success
Info 10:58:38: Cell 18 executed with state Success
Info 10:58:38: Cell 19 executed with state Success
Info 10:58:38: Cell 20 executed with state Success
Info 10:58:38: Cell 21 executed with state Success
Info 10:58:42: Execute Cells request 22
Info 10:58:42: Execute Cell 22 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:59:13: Cancel all remaining cells true || Error || undefined
Info 10:59:13: Cancel pending cells
Info 10:59:13: Cell 22 executed with state Error
Info 10:59:51: Execute Cells request 13
Info 10:59:51: Execute Cell 13 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Info 10:59:52: Cell 13 executed with state Success
Info 10:59:58: Execute Cells request 22
Info 10:59:58: Execute Cell 22 ~/Repos/neo-mp/decision_spaces/task_nodes/task_node_sl_0.ipynb
Warn 11:00:12: Error in waiting for cell to complete [Error: Canceled future for execute_request message before replies were done
	at a.KernelShellFutureHandler.dispose (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:32353)
	at /home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:26572
	at Map.forEach (<anonymous>)
	at y._clearKernelState (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:26557)
	at /home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:29000
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)]
Warn 11:00:12: Cell completed with errors [Error: Canceled future for execute_request message before replies were done
	at a.KernelShellFutureHandler.dispose (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:32353)
	at /home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:26572
	at Map.forEach (<anonymous>)
	at y._clearKernelState (/home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:26557)
	at /home/lenhart/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/node_modules/@jupyterlab/services.js:2:29000
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)]
Info 11:00:12: Cancel all remaining cells true || Error || undefined
Info 11:00:12: Cancel pending cells
Info 11:00:12: Cell 22 executed with state Error

Coding Language and Runtime Version

Python 3.9.10

Language Extension Version (if applicable)

v2022.4.1

Anaconda Version (if applicable)

4.11.0

Running Jupyter locally or remotely?

Remote

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 14
  • Comments: 18 (5 by maintainers)

Most upvoted comments

I experienced this error today and can confirm it occurred due to an out of memory condition

Just putting this here to help everyone that’s going through this with Mac’s Silicon (Yes, I know) . Problem is with the new versions of tensorflow-metal, downgrading to 0.3 worked for me. The newer versions aren’t reading the memory, so you would have 0mb of system memory being identified. Cheers!

I’m having this error trying to run a jupyter notebook on a remote server through vs code. I have no problems if I use the terminal in vs code to run the first cell of the notebook, but any time I try to connect a notebook I get similar problems to above.

Had this error today on my mac (M1 Max with 64GB Memory, Python version 3.9.6) when I played with the MNIST dataset using PyTorch. The error appeared when mps was used: device = torch.device("mps")

However, when I switch back to cpu my code worked fine.