Please take a moment to search the forum and documentation before posting a new topic.
If you’re creating a debugging post, please include the following info:
Are you running your app locally or is it deployed? Deployed
If your app is deployed:
a. Is it deployed on Community Cloud or another hosting platform? Community Cloud
b. Share the link to the public deployed app. https://bioreactor.streamlit.app/
Share the full text of the error message (not a screenshot).
Error: Unrecognized data set: decc170027f72833ee6bda4d99526ec0
at u (http://localhost:8501/static/js/7612.3f409b56.chunk.js:2:336974)
at oC (http://localhost:8501/static/js/7612.3f409b56.chunk.js:2:742221)
at HC.aC [as change] (http://localhost:8501/static/js/7612.3f409b56.chunk.js:2:742348)
at HC.insert (http://localhost:8501/static/js/7612.3f409b56.chunk.js:2:755518)
at E.createView (http://localhost:8501/static/js/8460.570de48a.chunk.js:1:12304)
at async E.componentDidUpdate (http://localhost:8501/static/js/8460.570de48a.chunk.js:1:10411)
Share the Streamlit and Python versions.
Python 3.9
Streamlit 1.40
I’ve seen this topic in a few different threads but am not 100% convinced that there has been a proper resolution as the only solution wasn’t confirmed that it worked. This app works extremely well with a single user but as soon as multiple instances are spun up the plotting throws this error. Not clear what exactly is causing it.
Updated the streamlit version to 1.43 and it appears to not throw the error anymore. The graph goes blank temporarily and then comes back later. I’d like to understand a bit better on what is going on under the hood here.
Without going too far down the rabbit hole, I was able to workaround this issue by modifying the data set names in the Altair charts. This temporary fix is working for me in in 1.45.1.
"""Takes an Altair chart, renames its data sets and returns a VegaLiteSpec"""
def temp_fix(chart:alt.Chart):
vega_lite_spec = chart.to_dict()
vega_lite_str = json.dumps(chart.to_dict(), indent=2)
for dataset_index, dataset_name in enumerate([k for k in vega_lite_spec["datasets"].keys() if k.startswith("data-")]):
new_dataset_name = f"dataset_{dataset_index}"
vega_lite_str = vega_lite_str.replace(f'{dataset_name}', f'{new_dataset_name}')
vega_lite_spec = json.loads(vega_lite_str)
return vega_lite_spec
# Note: This yields the "Unrecognized data set" error some of the time
# st.altair(chart)
# Note: No error with this, and the chart seems to look and work the same as before.
st.vega_lite_chart(spec=temp_fix(chart))
This is a temporary fix. If anyone knows what the real issue is and how to resolve it properly, please please please pipe up.