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.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.