☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Bokeh 3.1.1 does not render any more in jupyter notebook

Community Supportbokeh
johann-petrak
johann-petrak

I have code that works fine with Bokeh 2.4.3, notebook 6.5.3 and Ipython 8.11.0

The same code does not render anything with Bokeh 3.1.1, notebook 6.5.4, Ipython 8.12.2 and jupyter 1.0.0 and jupyter_bokeh 3.0.7 installed.

Here is the full, self-contained code:

import bokeh
print("bokeh", bokeh.__version__)
import bokeh.io
import bokeh.plotting
import numpy as np
import notebook, IPython, jupyter, jupyter_bokeh
print("notebook", notebook.__version__, "IPython", IPython.__version__, "jupyter", jupyter.__version__, jupyter_bokeh.__version__)
bokeh.io.output_notebook()

x=np.arange(100)
y1=np.random.randn(100)
y2=np.random.randn(100)
source = bokeh.models.ColumnDataSource(data=dict(x=x,y1=y1,y2=y2))
xdr = bokeh.models.Range1d(start=0, end=99)
p1 = bokeh.plotting.figure(height=100, width=600,tools="xpan,box_zoom,wheel_zoom,xbox_select,reset,undo", toolbar_location="above",x_axis_location="above", x_range=xdr)
p1.line('x', "y1", source=source)
p2 = bokeh.plotting.figure(height=100, width=600,tools="", toolbar_location=None,x_axis_location="below", x_range=xdr)
p2.line('x', "y2", source=source)
fig=bokeh.layouts.gridplot([p1,p2], ncols=1)
bokeh.plotting.show(fig)

This shows the “BokehJS 3.1.1 successfully loaded.” message but no other output whatsoever.

The Javascript console shows the following error message for the tab:

Uncaught (in promise) TypeError: this.plot_view.state is undefined
    connect_signals https://cdn.bokeh.org/bokeh/release/bokeh-3.1.1.min.js:648
    build_views https://cdn.bokeh.org/bokeh/release/bokeh-3.1.1.min.js:224

⌁   Link to post
Bryan
Bryan

This seems to be some issue with gridplot. There are lots of tests and examples around gridplot and this usage seems consistent with those, but I don’t really use gridplot so I can’t say for certain if it is a usage issue, or a bug. I’d encourage you to make a GitHub Issue with full details.

In any case, a workaround that works for me is to use column instead:

fig=bokeh.layouts.column(p1, p2)
⌁   Link to post
johann-petrak
johann-petrak

Thanks a lot … yes I can confirm that the workarounds … work:

  • removing the undo tool
  • and/or using bokeh.layouts.column(p1, p2)

However the second method makes the graph looks somewhat different, so for me removing the undo tool is the better option.

Thanks again!

⌁   Link to post

End of archived discussion · Replies are disabled