Closed fkhjoy closed 3 years ago
Thanks for the bug.
It looks to me like the kernel can't be run by jupyter. If you attempt starting jupyter using the same kernel outside of VS code it might give you more information as to why. To do so you'd:
jupyter notebook
python38264bit58e42c9575d24eb58f427896571571af
kernelAdditionally if you could set this setting:
That should show a lot more output in the 'jupyter' output tab in VS code.
Thanks for the bug.
It looks to me like the kernel can't be run by jupyter. If you attempt starting jupyter using the same kernel outside of VS code it might give you more information as to why. To do so you'd:
1. Go to the directory with the problem in terminal 2. Run `jupyter notebook` 3. Create a new notebook 4. Pick the `python38264bit58e42c9575d24eb58f427896571571af` kernel 5. Look at the output at the terminal (assuming it will fail too)
Additionally if you could set this setting:
That should show a lot more output in the 'jupyter' output tab in VS code.
Thank You. I also ran the notebook from terminal and web browser. It also failed to connect the kernel. I was curious to know the reason for this.
I was curious to know the reason for this.
It should list the reason in the terminal. You can get more info from jupyter by setting the log level higher:
jupyter notebook --log-level=DEBUG
I was curious to know the reason for this.
It should list the reason in the terminal. You can get more info from jupyter by setting the log level higher:
jupyter notebook --log-level=DEBUG
That sounds like the kernelspec might be invalid. At least stack overflow is pointing to unicode problems that might cause that subprocess error.
Can you try deleting this kernel directory (it was created by VS code)
/home/ubuntu/.local/share/jupyter/kernels/python38264bit58e42c9575d24eb58f427896571571af
And then trying again?
Can you try deleting this kernel directory (it was created by VS code)
/home/ubuntu/.local/share/jupyter/kernels/python38264bit58e42c9575d24eb58f427896571571af
And then trying again?
I deleted that Kernel. I had to set a new kernel after opening jupyter notebook. I am sharing both my terminal and browser issue.
Did you start and stop jupyter after deleting that kernel?
That looks like it's trying to attach to the existing kernel.
Did you start and stop jupyter after deleting that kernel?
That looks like it's trying to attach to the existing kernel.
Yes. I restarted the kernel. It showed like "Start without kernel" or "Set up a new kernel" Then I set up a new kernel.
Sorry I meant kill jupyter itself. Not just the old kernel. Restart jupyter notebook
Sorry I meant kill jupyter itself. Not just the old kernel. Restart
jupyter notebook
Sorry. I meant that. After deleting, I restarted the Jupyter from Terminal
And what does the terminal output show? Does it give you a 404 error?
This issue here may be relevant. https://github.com/jupyter/notebook/issues/5814
Hopefully if you're getting an error from jupyter it's giving you something more than just a 404.
Hopefully if you're getting an error from jupyter it's giving you something more than just a 404.
I am facing this issue from yesterday. Even if I clone the same repository from my github, it throws same problem. So, what could be the notebook's internal issue? Also, I noticed that, I am facing the same problem for each notebook in that directory even after creating new notebook. My settings.json is
{
"files.associations": {
"deque": "cpp",
"string": "cpp",
"vector": "cpp"
},
"python.pythonPath": "/usr/bin/python3"
}
And another notebook is running well, that has only on different directory
{
"python.pythonPath": "/usr/bin/python3"
}
So, I found a solution. If I run from different window of vscode and not being in the directory of the notebook, it runs smoothly.
So, Kernel is failing when I run being at the same directory in a window. And the problem is in the directory for all .ipynb and also .py file I recently noticed.
@fkhjoy
Install from VSIX
Jupyter->Logging
debug
Jupyter
output panel.Thanks
Closing this issue as its been over 4 weeks, since the information was requested. We'll be happy to reopen the issue when the requested information has been provided.
Environment data
Expected behaviour
Connected to local server with Jupyter Output
``` [I 14:29:48.777 NotebookApp] Kernel started: 338c25d0-39b3-4471-ad33-f627d59f74aa, name: python38264bit58e42c9575d24eb58f427896571571af [W 14:29:48.788 NotebookApp] delete /t-b3b6f7a6-c9f1-4c28-84cb-28f8cdabd1df.ipynb [I 14:29:48.820 NotebookApp] Kernel started: 067ec0a0-cc2c-4541-8aff-33a871976ced, name: python38264bit58e42c9575d24eb58f427896571571af [I 14:29:48.837 NotebookApp] Kernel started: f4461f07-e284-4d9a-b1a7-76cac9119f47, name: python38264bit58e42c9575d24eb58f427896571571af [I 14:29:48.850 NotebookApp] Kernel started: 272852be-dc17-4ae8-946b-01975f13b72f, name: python38264bit58e42c9575d24eb58f427896571571af [W 14:29:48.857 NotebookApp] delete /t-09a9a685-7aac-4af9-b7e4-020ea85e2ae7.ipynb [W 14:29:48.873 NotebookApp] delete /t-e90d39e7-d365-4b7a-8b73-be2321f10b02.ipynb [W 14:29:48.882 NotebookApp] delete /t-bf1c6aac-2e4d-4df2-b73c-6fdd12c2be6b.ipynb [I 14:29:49.397 NotebookApp] Creating new notebook in / [I 14:29:49.408 NotebookApp] Creating new notebook in / [I 14:29:49.419 NotebookApp] Creating new notebook in / > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel" > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel" > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel" > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel" > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel" > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel" [I 14:29:49.796 NotebookApp] Kernel started: 3066b5cf-3b26-4e8b-addb-decca5a8f149, name: python38264bit58e42c9575d24eb58f427896571571af [I 14:29:49.807 NotebookApp] Kernel started: d6314ca0-3282-444f-930b-b9af5f0cc30a, name: python38264bit58e42c9575d24eb58f427896571571af [W 14:29:49.812 NotebookApp] delete /t-34ce1030-237e-4f93-9baa-442d3c623a5f.ipynb [W 14:29:49.819 NotebookApp] delete /t-afa95c44-aa2d-4445-b730-166dc4d510dc.ipynb [I 14:29:49.844 NotebookApp] Kernel started: 87b79135-bd17-4fa4-90e3-241b0c055923, name: python38264bit58e42c9575d24eb58f427896571571af [W 14:29:49.850 NotebookApp] delete /t-7d13316e-0052-4d33-9ed9-7dbf07a77c8d.ipynb ```Actual behaviour
Failed to connect to Jupyter notebook. http://localhost:8888/ Error: Kernel Python 3.8.2 64-bit is not usable with Jupyter Output
``` Starting Jupyter from /usr/bin/python3 with command line --no-browser --notebook-dir="/home/ubuntu/Tasks/Python/stock_amibroker" --config=/tmp/f8410491-94a9-479d-a09c-210cba1fa93d/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0 > /usr/bin/python3 (daemon) -m jupyter notebook --no-browser --notebook-dir="/home/ubuntu/Tasks/Python/stock_amibroker" --config=/tmp/f8410491-94a9-479d-a09c-210cba1fa93d/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0 > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py pip list > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py pip list [I 14:48:10.502 NotebookApp] The port 8888 is already in use, trying another port. [I 14:48:10.503 NotebookApp] Serving notebooks from local directory: /home/ubuntu/Tasks/Python/stock_amibroker [I 14:48:10.503 NotebookApp] Jupyter Notebook 6.2.0 is running at: [I 14:48:10.504 NotebookApp] http://localhost:8889/?token=417186c78c21fdc78626a84360e3d869d320b29270e75a66 > /usr/bin/python3 (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/vscode_datascience_helpers/getServerInfo.py [I 14:48:10.504 NotebookApp] or http://127.0.0.1:8889/?token=417186c78c21fdc78626a84360e3d869d320b29270e75a66 > /usr/bin/python3 (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/vscode_datascience_helpers/getServerInfo.py [I 14:48:10.504 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 14:48:10.506 NotebookApp] To access the notebook, open this file in a browser: file:///home/ubuntu/.local/share/jupyter/runtime/nbserver-22281-open.html Or copy and paste one of these URLs: http://localhost:8889/?token=417186c78c21fdc78626a84360e3d869d320b29270e75a66 or http://127.0.0.1:8889/?token=417186c78c21fdc78626a84360e3d869d320b29270e75a66 [I 14:48:10.673 NotebookApp] Creating new notebook in / > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel" > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel" > /usr/bin/python3 (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/vscode_datascience_helpers/getServerInfo.py > /usr/bin/python3 (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/vscode_datascience_helpers/getServerInfo.py [I 14:48:10.997 NotebookApp] Kernel started: 929a4891-8476-4fba-8ea8-daef87f1872d, name: python38264bit58e42c9575d24eb58f427896571571af [W 14:48:11.010 NotebookApp] delete /t-560f0799-3118-4edf-8ceb-35a206222340.ipynb [I 14:48:13.999 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports [I 14:48:17.011 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports [I 14:48:20.023 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports [I 14:48:23.031 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports [W 14:48:26.040 NotebookApp] KernelRestarter: restart failed [W 14:48:26.041 NotebookApp] Kernel 929a4891-8476-4fba-8ea8-daef87f1872d died, removing from map. Error 2021-02-24 14:48:30: Kernel died while waiting for idle Error 2021-02-24 14:48:30: Failed to change kernel [c [Error]: Kernel is not usable. Check the Jupyter output tab for more information. at n (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:9:176843) at r (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:9:176965) at o (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:1:57939) at Object.e.emit (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:1:57653) at e.emit (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:1:55890) at c.dispose (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:3:540973) at /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:3:545409 at Object.t.each (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:1:63056) at m (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:3:545325) at /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:3:544204 at runMicrotasks (Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Logs
Output for
Jupyter
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toJupyter
)``` Error 2021-02-24 14:19:05: DataScience Error [i [Error]: at new t.WrappedError (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:1:153031) at /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:654636 at processTicksAndRejections (internal/process/task_queues.js:97:5) Error: Kernel Python 3.8.2 64-bit is not usable. Check the Jupyter output tab for more information. at w.createNewKernelSession (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554995) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async w.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554404) at async m.startNew (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:549756) at async _.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:520500) at async /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:653463] { category: 'invalidkernel', originalException: [c [Error]: Kernel Python 3.8.2 64-bit is not usable. Check the Jupyter output tab for more information. at w.createNewKernelSession (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554995) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async w.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554404) at async m.startNew (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:549756) at async _.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:520500) at async /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:653463] { category: 'invalidkernel', kernelConnectionMetadata: { kind: 'startUsingKernelSpec', interpreter: [Object], kernelSpec: [a] } } } > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v > /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v ```