voila-dashboards / voila

Voilà turns Jupyter notebooks into standalone web applications
https://voila.readthedocs.io
Other
5.46k stars 504 forks source link

ipywidgets displayed by metakernel 0.25.0 python magic freezes voila #682

Open joequant opened 4 years ago

joequant commented 4 years ago

metakernel 0.25.0 has a new feature in which you can use python magics to create ipywidgets. However voila freezes when encountering these cells.

To reproduce:

Set up a metakernel kernel with 0.25.0 such as calysto/bash-kernel

Include the following two cells

%%python import ipywidgets

%%python ipywidgets.IntSllider()

These widgets will appear fine in the kernel, but voila will freeze when it runs the slider cell. Metakernel uses special code to handle ipywidgets which I wrote, and so there is something that voila is tripping over.

joequant commented 4 years ago

The only difference I can see between ipython and metakernel is that metakernel returns None rather than an empty dict

joequant commented 4 years ago

I've put in a fix to metakernel, but would suggest that voila should issue an error rather than waiting for a time out.

joequant commented 4 years ago

Appears to be an issue in nbclient