jupyter-dash icon indicating copy to clipboard operation
jupyter-dash copied to clipboard

Switching kernel breaks the extensions

Open dpinte opened this issue 4 years ago • 0 comments

The jupyterlab extension is registering the comm target at notebook creation time (see https://github.com/plotly/jupyter-dash/blob/351cb7c24409b2312a474568b70005ce66eb31be/extensions/jupyterlab/src/index.ts#L78). This means that changing the kernel will not work. In practice all calls to JupyterDash.infer_jupyter_proxy_config() will fail after the kernel is changed (for a good reason).

A potential solution would be to listen to the ISessionContext.kernelChanged signal and register the comm target against the updated kernel.

I have only tested it with Jupyterlab but I suspect the nbextension has the same problem.

dpinte avatar Jul 29 '21 12:07 dpinte