Bokeh produces two charts when deployed!


I am developing a simple app using bokeh (==2.2.1) and streamlit (==0.66.0).

When I compile the app (using streamlit) I get two identical bokeh charts. After refreshing the site( browser) the normal behavior, i.e. no duplicate chart is seen. It is quite random. This behavior was observed both in offline (localhost) and online (Heroku app) mode.
The Matplotlib plot works perfectly, which can be seen here:

The .py file using bokeh is here:

Not able to understand what exactly is the issue- likely something at the backend. I am not good enough to understand the backend process. You can easily call me a Noob. :blush:

Could someone suggest something? Bokeh is a much better chart option compared to Matplotlib, especially for web.



Hi @Prabhas_K_Yadav, welcome to the Streamlit community!

I’m not able to trigger this issue. Can you take a screenshot of this when it happens and post it here, or provide some steps to reproduce it?

Thanks for your response Randy,

First streamlit is awesome. Thanks a ton for such a great stuff. :blush:

The app, which is only my second attempt with the streamlit, has two Bokeh plots. One of the plots of the two is always duplicated. After refreshing the (web)page, the first one is not duplicated, but then the second one gets duplicated. This is random, also in the localhost server.

Pls. find a couple of screenshots here.

You may also see the screencapture (.webm file) from [Screen_Capture]

You can find the code from my GitHub repo here
The .py code with Bokeh the Bokeh plot is keff_bf



Hi, I have expierience the the same behavior.
It’s quite random.
For Reference:
Python 3.7.9
Name: streamlit
Version: 0.67.1
Name: bokeh
Version: 2.2.1

Hello All,

May be this could help.

In the app, I have used:
Python 3.8.3
Streamlit 0.67.1
bokeh 2.2.1
numpy 1.19.2
pandas 1.1.2

Bokeh is definitely a better library for the app.



Hi Streamlit team,

Your app is amazing and I use it frequently.
Since I upgraded from version 0.64.x to 0.67.1 I’m experiencing the same issue.
I display Bokeh tables and they are doubled when I load them.
This issue is not happening all the time, but when it does, it is really frustrating.
Please address it as soon as possible.

Thank you

While I understand your frustration, I do want to highlight that we do take regressions seriously. However, when things are hard to trigger they are also hard to solve. If someone can figure out how to reliably cause this behavior, then it will likely get fixed in short order.