extension-examples icon indicating copy to clipboard operation
extension-examples copied to clipboard

Kernel output extension: Error: Session has no kernel when panel is not yet created

Open cmarmo opened this issue 10 months ago • 0 comments

Description

It is my understanding that the command execute in the kernel output extension should open a new kernel output panel if it is not there yet: https://github.com/jupyterlab/extension-examples/blob/203393a2172599c27988c0e23b9a107b8cf9f9c5/kernel-output/src/index.ts#L83-85

Unfortunately, the command execution crashes with

Error: Session has no kernel.

Reproduce

  1. Open a notebook
  2. Execute the cells
  3. Click on "Kernel Output" then "Contact Kernel and Execute code"
  4. Enter the command, then click on "Execute"

The panel is not open and the error is thrown in the development console

Image

https://github.com/user-attachments/assets/e55787e3-6051-4e86-8c80-1daa52209c0d

My impression is that the createPanel promise is not fulfilled when the extension tries to execute the command. I have tried some solutions on my side but I'm not very good with promises.... 😅

Expected behavior

If my understanding of the code is correct, the panel should be created and the output displayed.

Context

  • Operating System and version: Linux Fedora 41
  • Browser and version: Firefox 134.0.1
  • JupyterLab version: Version 4.3.5 installed in a mamba environment
  • Kernel output extension: current version on main

cmarmo avatar Jan 31 '25 17:01 cmarmo