Davide
Davide

Reputation: 119

After updating to bokeh 1.2 I am experiencing several problems running my bokeh app with gridplot

I have just upgraded to bokeh 1.2 and my bokeh app stopped working giving me the following error and showing just a blank page:

05:04 [WARNING] W-1000 (MISSING_RENDERERS): Plot has no renderers: Figure(id='1177', ...)
05:04 [WARNING] W-1005 (FIXED_SIZING_MODE): 'fixed' sizing mode requires width and height to be set: Column(id='1209', ...)
05:04 [WARNING] W-1005 (FIXED_SIZING_MODE): 'fixed' sizing mode requires width and height to be set: Column(id='1255', ...)
05:04 [WARNING] W-1005 (FIXED_SIZING_MODE): 'fixed' sizing mode requires width and height to be set: WidgetBox(id='1174', ...)
05:04 [WARNING] W-1005 (FIXED_SIZING_MODE): 'fixed' sizing mode requires width and height to be set: WidgetBox(id='1175', ...)
05:04 [WARNING] W-1005 (FIXED_SIZING_MODE): 'fixed' sizing mode requires width and height to be set: WidgetBox(id='1176', ...)

Does anyone has any clue of why it is doing that? everything works fine with bokeh 1.0.4

I have tried changing the sizing mode and to specify width and height but it displays a blank page if I don't choose 'fixed' or it just keeps giving error messages with plot_width and plot_height among the gridplot attributes.

Also, the first warning indicates a plot with a missing renderer, and it is referred to an empty figure I've created to have just a blank space of specific size in the gridplot. Any suggestion to fix that as well?

Below you can see the portion of the code I'm using:

widget_highlight_select = widgetbox([highlight_select])

widget_cd_select_button = widgetbox([rendering_button]+[customer_select]+[debtor_select])

widget_degree_select = widgetbox([degree_select])

empty = figure(plot_width=200, plot_height=100) #just to create space between widgets
empty.outline_line_color = None

plot.renderers.append(graph)

patterns_series = column([fig, ts])

#layout
l = gridplot([[widget_highlight_select, widget_degree_select, empty, widget_cd_select_button, None,spinner], [plot, patterns_series]], sizing_mode='fixed') #, merge_tools=False)

Upvotes: 4

Views: 4570

Answers (1)

Seb
Seb

Reputation: 1775

Note that some warnings are not necessarily 'problems' that need fixing. I get the missing renderers a lot in bokeh apps I make because I like to start with empty plots and empty sources and fill them based on inputs.

In such cases you can silence these warnings like this:

from bokeh.core.validation import silence
from bokeh.core.validation.warnings import EMPTY_LAYOUT, MISSING_RENDERERS
silence(EMPTY_LAYOUT, True)
silence(MISSING_RENDERERS, True)

However I would only add these when the code is all done or you may miss warnings that you'd actually want to fix when developing.

For the 'fixed_size' warning I will suggest alternatives instead of an answer:

You can use a Spacer object with a given width and height

https://docs.bokeh.org/en/latest/docs/reference/layouts.html

https://docs.bokeh.org/en/latest/docs/user_guide/layout.html

Before the Spacer was implemented you could use empty Div widgets for spacing elements.

Upvotes: 4

Related Questions