☰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 2.4- issue rendering ipywidgets

Community Support
epifanio
epifanio

Trying to run the ipyleaflet_tiles.py I got the following error:

  File "/home/epinux/.local/lib/python3.9/site-packages/ipywidgets_bokeh/kernel.py", line 67, in send
    self._trigger_change(event)
  File "/home/epinux/.local/lib/python3.9/site-packages/ipywidgets_bokeh/kernel.py", line 83, in _trigger_change
    self.document._trigger_on_change(event)
AttributeError: 'Document' object has no attribute '_trigger_on_change'

full log: bokeh_serve_ipywidgets.log · GitHub

The same code works running bokeh 2.3.2, I tried to upgrade [ipywidgets, ipywidgets_bokeh] to the latest releases, but the error persists.

Thanks for any help!

⌁   Link to post
epifanio
epifanio

Thank you @Philipp_Rudiger , I have been testing the new release - the IPywidgets are now rendering inside a bokeh server app but I can’t manage to link together multiple widgets.
I opened an issue here: lost interaction between ipywidgets when wrapped into bokeh · Issue #39 · bokeh/ipywidgets_bokeh · GitHub
The slider is supposed to update the mapcanvas zoom level, but seem the interaction provided by jslink is lost (the same example code was working using previous release of bokeh+ipywidgets)

from ipywidgets_bokeh import IPyWidget
import ipywidgets as widgets

from bokeh.layouts import row
from bokeh.plotting import curdoc
from ipyleaflet import Map, basemaps
from ipywidgets import jslink

m = Map(center=(46.01, 6.16), zoom=12, basemap=basemaps.Stamen.Terrain)
zoom_slider = widgets.IntSlider(description='Zoom level:', min=0, max=15, value=7)
jslink((zoom_slider, 'value'), (m, 'zoom'))

slider_wrapper = IPyWidget(widget=zoom_slider, width=600, height=400)
map_wrapper = IPyWidget(widget=m, width=600, height=400)


doc = curdoc()
doc.add_root(row(slider_wrapper, map_wrapper))
⌁   Link to post

End of archived discussion · Replies are disabled