I recently switched from Bokeh 2.4.3 to Bokeh 3.1.1 and found several of my plots not working anymore.
The plots in question used figure.image to create a pixel-based plot.
What I found out is that they now seem to have problems using raw python lists, and only work if I cast those to numpy arrays.
My code looked somewhat like this:
data =  for <some iteration> <some computation> data.append([sub_data]) source = ColumnDataSource() source.data['data'] = data plot = ... plot.image(source=source, image='data')
To make this work again, I had to change the line within the loop to
which to me looks like code smell.
As an alternative way to produce this bug, you can take the exemplary code given in image — Bokeh 3.1.1 Documentation, which naturally produces numpy arrays, and replace [d] with [d.tolist()] in the call to p.image.