Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Jupyter Notebook fails to load mojo kernel #3304

Open
tallinn1960 opened this issue Jul 24, 2024 · 0 comments
Open

[BUG] Jupyter Notebook fails to load mojo kernel #3304

tallinn1960 opened this issue Jul 24, 2024 · 0 comments
Labels
bug Something isn't working mojo-repo Tag all issues with this label

Comments

@tallinn1960
Copy link

Bug description

After loading any .ipynb file from the mojo/examples/notebooks directory and selecting the mojo kernel, Jupyter complains about "Kernel could not be started. Kernel died unexpectedly." This happens with both JupyterLab and VSCode. Here is the log from VSCode.

Visual Studio Code (1.91.1, undefined, desktop)
Jupyter Extension Version: 2024.6.0.
Python Extension Version: 2024.10.0.
Pylance Extension Version: 2024.7.1.
Platform: darwin (arm64).
Workspace folder ~/IdeaProjects/mojo, Home = /Users/tallinn
17:29:14.306 [info] Telemetry level is off
17:29:14.306 [info] Experiments are disabled, only manually opted experiments are active.
17:29:31.664 [info] Starting Kernel (Mojo) for '~/IdeaProjects/mojo/examples/notebooks/Mandelbrot.ipynb' (disableUI=true)
17:29:31.687 [info] Launching Raw Kernel Mojo # /Users/~/.modular/pkg/packages.modular.com_mojo/venv/bin/python
17:29:31.689 [info] Process Execution: ~/.modular/pkg/packages.modular.com_mojo/venv/bin/python /Users/~/Library/Jupyter/kernels/mojo-jupyter-kernel/mojokernel.py -f /Users/~/Library/Jupyter/runtime/kernel-v2-70840xQK8DQHqhW2w.json --modular-home /Users/~/.modular --mojo-config-section mojo
    > cwd: //Users/~/IdeaProjects/mojo/examples/notebooks
17:29:32.020 [error] Disposing kernel process due to an error Error: Der Kernel wurde unerwartet beendet. Fehler: ... Weitere Informationen finden Sie im Jupyter-[Protokoll](command:jupyter.viewOutput).
    > Kernel Id = .mojo-jupyter-kernel./Users/~/.modular/pkg/packages.modular.com_mojo/venv/python././users/~/.modular/pkg/packages.modular.com_mojo/venv/bin/python#/users/~/library/jupyter/kernels/mojo-jupyter-kernel/mojokernel.py#-f#{connection_file}#--modular-home#/users/~/.modular#--mojo-config-section#mojo
    > at ChildProcess.<anonymous> (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.6.0-darwin-arm64/dist/extension.node.js:299:44339)
    > stdErr = 
17:29:32.020 [error] 
17:29:32.020 [error] Failed to connect raw kernel session: Error: Der Kernel wurde unerwartet beendet. Fehler: ... Weitere Informationen finden Sie im Jupyter-[Protokoll](command:jupyter.viewOutput).
17:29:32.020 [error] Failed to connect raw kernel session: Error: Der Kernel wurde unerwartet beendet. Fehler: ... Weitere Informationen finden Sie im Jupyter-[Protokoll](command:jupyter.viewOutput).
17:29:32.020 [warn] Failed to shutdown kernel, .mojo-jupyter-kernel./Users/~/.modular/pkg/packages.modular.com_mojo/venv/python././users/~/.modular/pkg/packages.modular.com_mojo/venv/bin/python#/users/~/library/jupyter/kernels/mojo-jupyter-kernel/mojokernel.py#-f#{connection_file}#--modular-home#/users/~/.modular#--mojo-config-section#mojo TypeError: Cannot read properties of undefined (reading 'dispose')
    at R_.shutdown (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.6.0-darwin-arm64/dist/extension.node.js:304:13629)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at A_.shutdown (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.6.0-darwin-arm64/dist/extension.node.js:304:22107)
17:29:32.021 [warn] Error occurred while trying to start the kernel, options.disableUI=true Error: Der Kernel wurde unerwartet beendet. Fehler: ... Weitere Informationen finden Sie im Jupyter-[Protokoll](command:jupyter.viewOutput).
    > Kernel Id = .mojo-jupyter-kernel./Users/~/.modular/pkg/packages.modular.com_mojo/venv/python././users/~/.modular/pkg/packages.modular.com_mojo/venv/bin/python#/users/~/library/jupyter/kernels/mojo-jupyter-kernel/mojokernel.py#-f#{connection_file}#--modular-home#/users/~/.modular#--mojo-config-section#mojo
    > at ChildProcess.<anonymous> (/Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.6.0-darwin-arm64/dist/extension.node.js:299:44339)
    > stdErr = 

macOS Sonoma 14.5, Mac mini M1

mojo 24.4.0 (2cb57382)

modular 0.8.0 (39a426b5)

Steps to reproduce

  • Include relevant code snippet or link to code that did not work as expected.
  • If applicable, add screenshots to help explain the problem.
  • If using the Playground, name the pre-existing notebook that failed and the steps that led to failure.
  • Include anything else that might help us debug the issue.

System information

- What OS did you do install Mojo on ?
- Provide version information for Mojo by pasting the output of `mojo -v`
- Provide Modular CLI version by pasting the output of `modular -v`
@tallinn1960 tallinn1960 added bug Something isn't working mojo-repo Tag all issues with this label labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

1 participant