I'm trying to create a webapp using bokeh. Mostly, it will consist of markdown text and some figures. Right now I'm stuck a getting voilà to show two bokeh figures side by side. Within the notebook everything runs smoothly, but in the voilà visualization I see errors like
Javascript Error: Error rendering Bokeh model: could not find #5db0eeb2-830f-4e00-b6fe-552a45536513 HTML tag
Now, if I try in classic jupyter notebook (within jupyter-lab Help
-> Launch Classic Notebook
), then it renders fine. However, when it is served from github, I get again javascript errors.
A MWE within jupyterlab but non-working in voilà is:
import numpy as np
import ipywidgets as widgets
import bokeh.plotting
from bokeh.io import output_notebook, show
from bokeh.models import ColumnDataSource, Line
output_notebook()
t = np.arange(10)
signal = np.arange(10)
f_1 = bokeh.plotting.figure(plot_width=400, plot_height=300, toolbar_location=None)
data_source_1 = ColumnDataSource(data=dict(t=t, signal=signal))
f_1.line(x='t', y='signal', source=data_source_1)
out_1 = widgets.Output()
with out_1:
show(f_1)
f_2 = bokeh.plotting.figure(plot_width=400, plot_height=300, toolbar_location=None)
data_source_2 = ColumnDataSource(data=dict(t=t, signal=2*signal))
f_2.line(x='t', y='signal', source=data_source_2)
out_2 = widgets.Output()
with out_2:
show(f_2)
widgets.HBox([out_1, out_2])
This is meant to be part of mini-lecture on analog modulations: the classic notebook version works fine, but when I try to use voilà-served version (click the Voilà
button there or just go to this other link) I hit the same problem.
Any clue?