Error: unknown property WheelZoomTool.renderers

I am new to JS and Bokeh and try to get the examples working.
Few do (first two pictures), most not (Firefox shows an empty panel, 3rd picture shows console with error message) and the interactive buttons at the right never show up. I guess that is the WheelZoomTool Error?

Python version : 3.10.13 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:15:57) [MSC v.1916 64 bit (AMD64)]
IPython version : 8.30.0
Tornado version : 6.4.2
NumPy version : 1.26.4
Bokeh version : 3.2.0
BokehJS static path : C:\Users\abacu\anaconda3\envs\tf\Lib\site-packages\bokeh\server\static
node.js version : v20.18.1
npm version : 10.8.2
jupyter_bokeh version : 4.0.5
Operating system : Windows-10-10.0.19045-SP0
Firefox 134.0.2

I noticed the higher jupyter_bokeh version, but before I updated it I had the same problem.
I also tried the following example from Spyder IDE and get:
WARNING:bokeh.core.validation.check:W-1000 (MISSING_RENDERERS): Plot has no renderers: figure(id=‘p1118’, …)

and the html file looks like picture 1.

from bokeh.io import output_notebook
from bokeh.plotting import figure, show, save, output_file

output_file(filename="myBokeh.html", title="Static HTML file")

# Example figure
fig = figure(background_fill_color='gray',
             background_fill_alpha=0.5,
             border_fill_color='blue',
             border_fill_alpha=0.25,
             height=300,
             width=500,
             x_axis_label='X Label',
             x_axis_type='datetime',
             x_axis_location='above',
             x_range=('2018-01-01', '2018-06-30'),
             y_axis_label='Y Label',
             y_axis_type='linear',
             y_axis_location='left',
             y_range=(0, 100),
             title='Example Figure',
             title_location='right',
             toolbar_location='below',
             tools='save')

save(fig)

The first warning is expected and can be ignored (or silenced if you really prefer). It was added very early on to Bokeh because we got tired of fielding repeated “why is my plot blank” support questions, when the answer was “because it has not had any glyphs added to it”. It is unusual that not having any glyphs (e.g. scatters, lines, etc) is a correct or intended situation, and this warning merely relays that.

The console message about WheelZoomTool is something else entirely, and unrelated to the first, despite the coincidental use of “renderers” in both. However, you will need to provide a complete Minimal Reproducible Example for me to investigate. The code block above does not reproduce the console error (it does not even have a WheelZoomTool at all).

That said, the proximate cause for the error is that the property WheelZoomTool.renderers did not yet exist in Bokeh version 3.2. It was added in Bokeh 3.3. in the PR Add support for zooming sub-plots by mattpap · Pull Request #13345 · bokeh/bokeh · GitHub.

The code above (even in the image) does not seem to try to access WheelZoomTool.renderers so again I can’t really speculate without the actual reproducing code. Otherwise, upgrading to a newer Bokeh version is probably the simplest thing to do (and required, if you are expecting to use WheelZoomTool.renderers)

Thank you so much, Bryan,

WheelZoomTool.renderers did not yet exist in Bokeh version 3.2

was the right hint. I mixed “pip install” and “conda install” and got an inconsistent environment. I created a new clean env and everything works fine now.

1 Like