voila-dashboards / voila

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

ipython.update not working in voila #837

Open blackedge-pm opened 3 years ago

blackedge-pm commented 3 years ago

I have a notebook that uses the ipython.update() command to show the output. This command doesn't function properly in voila and I have no idea why, since it seems like ipython is supported. In a standard jupyter notebook this code first displays 'original', and then displays whatever you put the slider to the widget from. In voila the output stays as 'original'.

from ipywidgets import interact
import ipywidgets as widgets

import IPython as ipython

x=display('original',display_id=72)

def inputWidget(a):
    ipython.display.update_display(str(a),display_id=72)

c = widgets.interact(inputWidget,a=1)
marckassay commented 3 years ago

I haven't used ipywidgets (at least not directly), but it seems that 'The example notebook' and 'Using third party widgets with voila' sections of their docs seems relevant.

blackedge-pm commented 3 years ago

I looked through all of these and I can't see a solution in them for this. I think this command is just not being handled properly somewhere in voila

marckassay commented 3 years ago

See if @martinRenou's recommendation in issue #603 resolves your issue too.

blackedge-pm commented 3 years ago

Can cells interact with each other in voila? Like that is what this is trying to do. It is trying to overwrite the output of a different cell.