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: https://keff-app.herokuapp.com/
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.
Could someone suggest something? Bokeh is a much better chart option compared to Matplotlib, especially for web.
First streamlit is awesome. Thanks a ton for such a great stuff.
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.
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
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.
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.
I have the same issue when using either st.write(bokeh_fig) or st.bokeh_chart(fig)., I’ve seen that when this happens, if you resize the web page it removes the duplicate one, maybe this helps you find the bug…
EDIT: I just realized that this is not happening in Stremlit version ‘0.62.1’.
If someone can produce a code snippet that reliably triggers this issue, it will be easier for us to try and resolve it. As it is, I still can’t make this behavior on my local machine. That’s not saying it’s not happening to people (clearly, several people above have reported this), but without being able to trigger it ourselves, we don’t have anything to work from.
What’s interesting about this error is that it doesn’t require a re-run of app (for me), but rather, changing anything about the size of browser window makes the second chart’s div disappear. Makes me think there’s something confusing the React side of Streamlit.
Regardless of the why, I will pass your example on to our frontend team to see if they can figure out what might cause this.
The issue seems to be resolved when I upgraded to 0.71.0.
So it seems there is a regression in 0.72.0.
If this really trouble you, I suggest you downgrade to 0.71.0 until the ST team can fix it again.
Thanks @erezrot, I suspected that as well. I did revert to 0.71.0 and indeed the issue went away, however 0.71.0 has other bugs that 0.72.0 fixed. Hard to choose which bugs I like more!