Timed out waiting to get a heartbeat from kernel process
See original GitHub issueEnvironment data
- VS Code version: 1.51.1
- Extension version (available under the Extensions sidebar): XXX
- Jupyter Extension version (available under the Extensions sidebar): v2020.11.358541065
- OS (Windows | Mac | Linux distro) and version: Linux x64 4.19.0-11-amd64
- Python and/or Anaconda version: Python V==3.7, Anaconda V==2020.07
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Jupyter server running: Local
Expected behaviour
Run selected cells and provide relevant output
Actual behaviour
The vs code doesn’t provide any output to for the running cell in .ipynb
XXX
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- Clicking on ipynb file loads the jupyter extension, Which in turn calls the jupyter notebook extension. This sometimes gives an error stating ‘Timed out waiting to get a heartbeat from kernel process’
But for reference, the following code was constituted in the ipynb file:-
import tensorflow as tf
import numpy
import matplotlib.pyplot as plt
def preprocess(dataset):
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
print('[INFO] cleaning dataset')
df = pd.read_csv(dataset)
df.drop(['user_id','account_id'],axis = 1)
df.replace([np.inf, -np.inf], np.nan, inplace=True)
df.fillna(df.mean(), inplace=True)
print('[INFO] train test split')
#importing train test split
X = df.drop(['target'],axis = 1)
y = df['target']
X_train, x_test, Y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=123)
return(X_train, x_test, Y_train, y_test)
X_train, x_test, Y_train, y_test = preprocess(r'taskdata.csv')
Logs
/media/nik/Media/Conda/envs/TFDS/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c “import notebook” /media/nik/Media/Conda/envs/TFDS/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c “import jupyter” /media/nik/Media/Conda/envs/clipper/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c “import ipykernel” /media/nik/Media/Conda/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c “import ipykernel” /media/nik/Media/Conda/envs/TFDS/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version /media/nik/Media/Conda/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c “import ipykernel” /media/nik/Media/Conda/envs/TFDS/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v /media/nik/Media/Conda/envs/TFDS/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v /media/nik/Media/Conda/envs/TFDS/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v /media/nik/Media/Conda/envs/clipper/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v /media/nik/Media/Conda/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v /media/nik/Media/Conda/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v Error 2020-11-19 22:47:07: Kernel died [r [Error]: Traceback (most recent call last):
at t._next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:762779)
at t.__tryOrUnsub (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:5463)
at t.next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:4632)
at t._next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:3736)
at t.next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:3407)
at t.next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:8976)
at /home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:9:108204
at /home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:428264
at /home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:428482
at Immediate._onImmediate (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:430047)
at processImmediate (internal/timers.js:439:21)]
Error 2020-11-19 22:47:07: Kernel died [r [Error]: Traceback (most recent call last):
at t._next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:762779)
at t.__tryOrUnsub (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:5463)
at t.next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:4632)
at t._next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:3736)
at t.next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:3407)
at t.next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:8976)
at /home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:9:108204
at /home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:428264
at /home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:428482
at Immediate._onImmediate (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:430047)
at processImmediate (internal/timers.js:439:21)]
Error 2020-11-19 22:47:36: Timed out waiting to get a heartbeat from kernel process. Error 2020-11-19 22:47:36: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process. Error 2020-11-19 22:47:36: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: Timed out waiting to get a heartbeat from kernel process. Error 2020-11-19 22:47:36: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process. Error 2020-11-19 22:47:36: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: Failed to determine if a notebook is active for the current editor [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:47:36: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)]
/media/nik/Media/Conda/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py -c “import ipykernel” /media/nik/Media/Conda/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v Error 2020-11-19 22:48:12: Kernel died [r [Error]: Traceback (most recent call last):
at t._next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:762779)
at t.__tryOrUnsub (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:5463)
at t.next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:4632)
at t._next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:3736)
at t.next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:3407)
at t.next (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:32:8976)
at /home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:9:108204
at /home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:428264
at /home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:428482
at Immediate._onImmediate (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:47:430047)
at processImmediate (internal/timers.js:439:21)]
Error 2020-11-19 22:48:41: Timed out waiting to get a heartbeat from kernel process. Error 2020-11-19 22:48:41: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process. Error 2020-11-19 22:48:41: Exception attempting to start notebook: [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:48:41: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:48:41: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)] Error 2020-11-19 22:48:41: DataScience Error [Error: Timed out waiting to get a heartbeat from kernel process. at m.waitForHeartbeat (/home/nik/.vscode/extensions/ms-toolsai.jupyter-2020.11.358541065/out/client/extension.js:49:646443)]
The code never returned any output
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Looks like ipykernel is not installed properly on your environment. Please could you try installing ipykernel into your environment manually.
wait, Is this happening because ipykerel is missing in my current venv??