There is a new Bokeh release that is coming up in the near future. It is a major number release. I tried the latest dev build and Streamlit did not render my bokeh plot, and gave no errors. This github issue documents what I am referring to in a little more detail (bottom of thread).
I just thought I would bring this to the attention of you all before its release. Thanks for the great tool!
Thanks for the heads up. Under the hood Streamlit emits the bokeh chart into a JSON with bokeh.embed.json_item and then uses this JSON in bokehjs.embed.embed_item on the frontend side.
My guess is, if Bokeh on the Python side is upgraded to 2.0.0, then BokehJS on the JS side should also be 2.0.0 but I could not find a corresponding version for BokehJS to test.
I tested Python Bokeh 2.0.0rc1 and the JSON item from 1.4.0 to 2.0.0rc1 do seem to change a small bit. It’s strange BokehJS did not spit an error on loading the JSON item…The only error log I could get was :
Here, a codepen to test JS embedding on Bokeh 2.0.0 : https://codepen.io/andfanilo/pen/bGdgBze there is actually an error log in the debug view : Error: property Grid.axis wasn't declared
The Bokeh 2 upgrade has been merged into Streamlit 0.57. I think Streamlit before 0.57 only works with Bokeh 1.0 and Streamlit 0.57+ only works with Bokeh 2.
Could you check your Bokeh/Streamlit versions ? And if it doesn’t work though the versions are ok, could you share a snippet of code so we can reproduce on our side many thanks !
Thanks for the warm welcome! And thanks to your help I was able to get it to work. Previously I was working with Bokeh 2 and Streamlit 0.56, but after upgrading Streamlit to 0.57 the Bokeh chart was able to display in the app.
I have streamlit 0.79 and bokeh 2.3 and I can’t get streamlit show my bokeh charts. Is this issue resolved or is there anything I am missing? I am simply trying streamlit’s bokeh example. Thanks.
Yeah, this is annoying. BokehJS (the frontend bokeh component) v2.3.0 is required if you’re using bokeh 2.3 from Python. But we’re currently unable to use BokehJS 2.3.0 or 2.3.1 because of a runtime error that it throws at import time.
I think (/hope) that this recently-merged BokehJS PR will solve that problem. It sounds like it will be in the Bokeh 2.4 release.
But currently, downgrading bokeh to 2.2.2 is still the only solution that works.