Closed n1ghtf4l1 closed 2 years ago
It looks like the jupyter server may have crashed so the kernel can't be found to run the cell. Are you able to run any cell, even a simple print(1)
?
Can you reload vscode, go through the repro steps again and provide the full logs from that session? If the server crashed, it was probably earlier in the logs, and we would want to see the crash message from that.
It looks like the jupyter server may have crashed so the kernel can't be found to run the cell. Are you able to run any cell, even a simple
print(1)
?
No I was not able to even run print(1)
then, but thanks I solved the issue after hours of searching the internet on StackOverflow as well as Github. I debugged the issue and found out there was a file called libstc++.so.6 in my conda virtual environment where I was running this program, that didn't have the required version of GLIBCXX_3.4.15.
So, I replaced that file from the one that was created on my global environment i.e in usr/lib/ because I tested the same program by running on the global environment and it worked just fine. Now it works fine even in the virtual environment. Thanks again!
thanks for the update - Glad you got it working
Hi,
Uninstalling and re-installing all the Jupyter-related plugins worked in my case.
Same error:
The Kernel crashed while executing code in the current cell or a previous cell
etc...
Best, N.
Environment data
Expected behaviour
It is expected that when we the following code the output should display this:
Actual behaviour
It is showing this in the output on the jupyter when run:
Steps to reproduce:
import matplotlib.pyplot as plt import gym import numpy as np
class CartPoleEnvManager: def init(self, device) -> None: """ (UPDATE!) we're no longer dealing with screen frames to determine the environment states, the class no longer has a
current_screen
attribute. Instead, we now have acurrent_state
attribute, which is initialized to None. """ self.device = deviceto access the tools that
device = torch.device("cuda" if torch.cuda.is_available() else "cpu") image_em = CartPoleEnvManager(device) image_em.image_reset() screen = image_em.render('rgb_array')
plt.figure() plt.imshow(screen) plt.title('None-processed Screen Example') plt.show()
info 9:48:10.896: Execute Cell 9 /home/arch/Workspace/lunar_lander/lunar_lander.ipynb info 9:48:10.899: Starting Jupyter Session id = 'startUsingPythonInterpreter:.jvsc74a57bd01aca715c408833f015ec2c50005d8b9b465033a7eca2c0a60c2042d35f67a26e./home/arch/miniconda3/envs/reinforcement-learning/python./home/arch/miniconda3/envs/reinforcement-learning/python.-m#ipykernel_launcher' (Python Path: /home/arch/miniconda3/envs/reinforcement-learning, EnvType: Conda, EnvName: 'reinforcement-learning', Version: 3.8.13) for '/home/arch/Workspace/lunar_lander/lunar_lander.ipynb' (disableUI=false) [I 09:48:10.950 NotebookApp] Creating new notebook in /lunar_lander [I 09:48:11.003 NotebookApp] Creating new notebook in info 9:48:11.23: installMissingDependencies /home/arch/miniconda3/envs/reinforcement-learning/bin/python, ui.disabled=false for resource '/home/arch/Workspace/lunar_lander/lunar_lander.ipynb' info 9:48:11.64: Process Execution: > ~/miniconda3/envs/reinforcement-learning/bin/python -c "import ipykernel"
FetchError: request to http://localhost:8888/api/sessions?1657858691713 failed, reason: getaddrinfo ENOTFOUND localhost at ClientRequest. (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:378131)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
category: 'unknown',
originalException: FetchError: request to http://localhost:8888/api/sessions?1657858691713 failed, reason: getaddrinfo ENOTFOUND localhost
at ClientRequest. (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:378131)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/taskqueues:83:21)
}
warn 9:48:11.723: Error occurred while trying to start the kernel, options.disableUI=false [Error]:
at new r (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:27924)
at new _ (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:2:1918192)
at /home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:24:140193
at processTicksAndRejections (node:internal/process/task_queues:96:5)
FetchError: request to http://localhost:8888/api/sessions?1657858691713 failed, reason: getaddrinfo ENOTFOUND localhost at ClientRequest. (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:378131)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
category: 'unknown',
originalException: FetchError: request to http://localhost:8888/api/sessions?1657858691713 failed, reason: getaddrinfo ENOTFOUND localhost
at ClientRequest. (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:378131)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/taskqueues:83:21)
}
warn 9:48:11.724: Kernel Error, context = start [Error]:
at new r (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:27924)
at new _ (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:2:1918192)
at /home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:24:140193
at processTicksAndRejections (node:internal/process/task_queues:96:5)
FetchError: request to http://localhost:8888/api/sessions?1657858691713 failed, reason: getaddrinfo ENOTFOUND localhost at ClientRequest. (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:378131)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
category: 'unknown',
originalException: FetchError: request to http://localhost:8888/api/sessions?1657858691713 failed, reason: getaddrinfo ENOTFOUND localhost
at ClientRequest. (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:378131)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
}
info 9:48:11.749: Process Execution: > ~/miniconda3/envs/reinforcement-learning/bin/python -c "import ipykernel"
FetchError: request to http://localhost:8888/api/sessions?1657858691713 failed, reason: getaddrinfo ENOTFOUND localhost at ClientRequest. (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:378131)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
category: 'unknown',
originalException: FetchError: request to http://localhost:8888/api/sessions?1657858691713 failed, reason: getaddrinfo ENOTFOUND localhost
at ClientRequest. (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:378131)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/taskqueues:83:21)
}
error 9:48:11.919: Error in execution (get message for cell) [Error]:
at new r (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:27924)
at new _ (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:2:1918192)
at /home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:24:140193
at processTicksAndRejections (node:internal/process/task_queues:96:5)
FetchError: request to http://localhost:8888/api/sessions?1657858691713 failed, reason: getaddrinfo ENOTFOUND localhost at ClientRequest. (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:378131)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
category: 'unknown',
originalException: FetchError: request to http://localhost:8888/api/sessions?1657858691713 failed, reason: getaddrinfo ENOTFOUND localhost
at ClientRequest. (/home/arch/.vscode/extensions/ms-toolsai.jupyter-2022.6.1101950301/out/extension.node.js:39:378131)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
}