I get the following error in my browser when I try to include tables in the bokeh layout using flask:
x
Bokeh Error
Model `StringFormatter' does not exist. This could be due to a widget or a custom model not being registered before first usage
This is how I turn my pandas DataFrame into a bokeh table:
df = df_func()
df.reset_index(inplace=True)
df.rename(columns={“index”: “Typ”}, inplace=True)
source = ColumnDataSource(df)
table1_columns = [ TableColumn(field=“Typ”, title=“Typ”), TableColumn(field=“Betrag”, title=“Betrag”),
TableColumn(field=“Trend”, title=“Trend”) ]
table1 = DataTable(source=source, columns=initial_columns, width=500, height=280)
I then combine the table with two (working) plots into a single layout:
layout = vplot(row(plot1, plot2), row(table1))
script, div = components(layout, )
My HTML file looks like this:
BokehTest
{{ div | safe }}
{{ script | safe }}
I also tried it with the {{ script | safe }} inside the .
I get the following three erros inside my browser (one at a time):
Model `DataTable’ does not exist (…)
or
Model `StringEditor’ does not exist. (…)
or
···
Model `StringFormatter’ does not exist. (…)