I just upgraded to Streamlit 1.26.0 (from 1.24.1) and it appears that Bokeh DataTables (Bokeh 2.4.3) will no longer display by calling st.bokeh_chart(figure). Has anyone else experienced this issue and do have any suggestions for correcting the problem? I am running Python 3.11. Thanks!
Have you confirmed that you have bokeh==2.4.3
version installed? It might have upgraded to version 3.2.2
automatically.
You might need to uninstall bokeh:
pip uninstall bokeh
then re-install it:
pip install bokeh==2.4.3
Thanks for passing along this information. As you suggested, I removed bokeh 2.4.3 from my machine (… it was 2.4.3), updated streamlit to 1.26.0, and then reinstalled bokeh 2.4.3 and the Bokeh DataTables still will not display. As I mentioned previously, I am running Python 3.11 on a MS Windows machine.
I tried this reinstall process on a second independent windows machine (which has similar configurations) and am experiencing the same problem on that machine too.
Thanks for your help! I greatly appreciate it!
Can you try running this code snippet and let me know if it’s still not showing any output? You can also do a screen recording of it. I also recommend creating a new virtual environment for this:
import streamlit as st
from bokeh.plotting import figure
x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]
p = figure(
title='simple line example',
x_axis_label='x',
y_axis_label='y')
p.line(x, y, legend_label='Trend', line_width=2)
st.bokeh_chart(p, use_container_width=True)
Thanks again for your response. The code that you included below works properly. Based on my previous testing, all graphs (bar, line, pie, etc.) will still generate in Steamlit 1.26. The issue I am experiencing is specifically related to Bokeh DataTables which no longer display starting in Steamlit 1.25 (based on my experience). Would you try running the code below? In Streamlit 1.24.1 you should see a DataTable and a line graph. In 1.26.0 you will only see a line graph.
import streamlit as st
import pandas as pd
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import DataTable, TableColumn
from bokeh.plotting import figure, output_file
# Create a dataframe and display in a Bokeh Data Table
df = pd.DataFrame(columns=['One'], data=(1, 2, 3))
output_file("a.html")
source = ColumnDataSource(df)
columns = [TableColumn(field='One', title='One', width=60, )]
p1 = DataTable(source=source, columns=columns, reorderable=False, index_width=0)
st.bokeh_chart(p1, use_container_width=False)
# Create a line graph
x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]
p = figure(
title='simple line example',
x_axis_label='x',
y_axis_label='y')
p.line(x, y, legend_label='Trend', line_width=2)
st.bokeh_chart(p, use_container_width=True)
| tonykip Developer Relations @Streamlit
September 15 |
- | - |
Can you try running this code snippet and let me know if it’s still not showing any output? You can also do a screen recording of it. I also recommend creating a new virtual environment for this:
import streamlit as st
from bokeh.plotting import figure
x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]
p = figure(
title='simple line example',
x_axis_label='x',
y_axis_label='y')
p.line(x, y, legend_label='Trend', line_width=2)
st.bokeh_chart(p, use_container_width=True)
I wanted to check-in and see if you had the same experience as I did when attempting to generate a Bokeh DataTable in Streamlit 1.25 or later. Thank you!
Hi @Jacob_Dykstra , this might be related to a bug that was produced recently (Bokeh Sliders cause JS errors in browser console · Issue #7171 · streamlit/streamlit · GitHub). This will likely get fixed in the next major release.
I too experienced Bokeh DataTable not displaying with version 1.26.0
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.