vscode-jupyter: Can't run cell, cell execution errors out with 'Canceled' notification
Environment data
- VS Code version: 1.53.0-insiders
- Jupyter Extension version (available under the Extensions sidebar): v2020.12.414227025
- Python Extension version (available under the Extensions sidebar): v2021.1.502429796
- OS (Windows | Mac | Linux distro) and version: Win 10 1909
- Python and/or Anaconda version: Python 3.9.0
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Jupyter server running: Local
Expected behaviour
When opening this notebook: OCTImagePrediction Notebook I expect the cells to run as they had in the past as seen as the committed output in the repo.
Actual behaviour
Instead when I try to run cells with MagicPython set as the kernel and Python 3.9.0 set as the interpreter, the kernel doesn’t properly connect and I see a notification with just the word Canceled
. Not sure what the exact error is.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- Clone OCTImagePrediction
- Open
Notebook.ipynb
- Set Python 3.9.0 as the interpreter
- Verify the kernel is set to MagicPython
- Click run on the first code cell.
- See notebook attempt to connect to kernel but then errors out with
Canceled
Logs
Error 2021-01-26 15:51:43: Failed to start the Daemon, StdErr: Traceback (most recent call last):
File "c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\vscode_datascience_helpers\daemon\__main__.py", line 126, in main
daemon_module = importlib.import_module(args.daemon_module)
File "C:\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\vscode_datascience_helpers\kernel_launcher_daemon.py", line 22, in <module>
from vscode_datascience_helpers.kernel_launcher import launch_kernel
File "c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\vscode_datascience_helpers\kernel_launcher.py", line 14, in <module>
from ipython_genutils.encoding import getdefaultencoding
ModuleNotFoundError: No module named 'ipython_genutils'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py", line 26, in <module>
runpy.run_module(module, run_name="__main__", alter_sys=True)
File "C:\Python39\lib\runpy.py", line 210, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "C:\Python39\lib\runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\vscode_datascience_helpers\daemon\__main__.py", line 137, in <module>
main()
File "c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\vscode_datascience_helpers\daemon\__main__.py", line 133, in main
raise Exception("Failed to start daemon")
Exception: Failed to start daemon
Error 2021-01-26 15:51:43: Failed to start the Daemon, ProcEndEx Error: Timeout waiting for daemon to start
at Timeout._onTimeout (c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:32:202723)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
Error 2021-01-26 15:51:43: Failed to start the Daemon, Ex Error: Timeout waiting for daemon to start
at Timeout._onTimeout (c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:32:202723)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
vslsStack: [ CallSite {}, CallSite {}, CallSite {} ]
}
Error 2021-01-26 15:51:43: Pinging Daemon Failed, Class name = h, completed in 5003ms, has a falsy return value, Arg 1: {}, Return Value: undefined Error: Timeout waiting for daemon to start
at Timeout._onTimeout (c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:32:202723)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
vslsStack: [ CallSite {}, CallSite {}, CallSite {} ]
}
Error 2021-01-26 15:51:43: Failed to create daemon, Class name = h, completed in 5007ms, has a falsy return value, , Return Value: undefined Error: Timeout waiting for daemon to start
at Timeout._onTimeout (c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:32:202723)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
vslsStack: [ CallSite {}, CallSite {}, CallSite {} ]
}
Error 2021-01-26 15:51:43: Failed to create the daemon service, defaulting to activated environment Error: Timeout waiting for daemon to start
at Timeout._onTimeout (c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:32:202723)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
vslsStack: [ CallSite {}, CallSite {}, CallSite {} ]
}
> C:\Python39\python.exe "c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" ipykernel_launcher --ip=127.0.0.1 --stdin=9048 --control=9046 --hb=9045 --Session.signature_scheme="hmac-sha256" --Session.key=b"8e939b98-6ff0-4c3f-8e6d-3142c03c053d" --shell=9047 --transport="tcp" --iopub=9049 --f=C:\Users\TANHAK~1\AppData\Local\Temp\tmp-73688eh4ZJBUPkaO.json
cwd: c:\Users\Tanha Kabir\github\OCTImagePrediction
> C:\Python39\python.exe "c:\Users\Tanha Kabir\.vscode-insiders\extensions\ms-toolsai.jupyter-2020.12.414227025\pythonFiles\pyvsc-run-isolated.py" ipykernel_launcher --ip=127.0.0.1 --stdin=9048 --control=9046 --hb=9045 --Session.signature_scheme="hmac-sha256" --Session.key=b"8e939b98-6ff0-4c3f-8e6d-3142c03c053d" --shell=9047 --transport="tcp" --iopub=9049 --f=C:\Users\TANHAK~1\AppData\Local\Temp\tmp-73688eh4ZJBUPkaO.json
cwd: c:\Users\Tanha Kabir\github\OCTImagePrediction
Error 2021-01-26 15:51:56: Timed out waiting to get a heartbeat from kernel process.
Error 2021-01-26 15:52:13: Timed out waiting to get a heartbeat from kernel process.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (7 by maintainers)
@tanhakabir Sorry about the time this cost you. We actually did intend to have this, but there is currently (in some scenarios) a bug that prevented this from running in the new Code-Insiders interface. I believe that we have the resolution for this coming in our next release. Didn’t realize from the error message that you were hitting this scenario.