Issue with streamlit app

Hi…I recently used the streamlit share to make an app…the github link is here :


it was running well last night,but has started crashing repeatedly now. This is the app link:
https://share.streamlit.io/bosemessi/streamlitmatches/main/matchreport.py

Can someone help me out here ?

Hi @bosemessi, welcome to the Streamlit community!

There’s a known limitation with matplotlib and threads, I’m wondering if this is the issue you’re running into:

Best,
Randy

Hi Randy,

thanks, I will look into this. Just to clarify, do I have to repeat this step for every image ? That is, create a _lock for every image ?

_lock = RendererAgg.lock

with _lock:
fig.title(‘This is a figure)’)
fig.plot([1,20,3,40])
st.pyplot(fig)

I think so? Unsure if you need to create _lock1, _lock2, etc, one for each chart.

The alternative of course would be to use something like plotly, but either way it’s unfortunately a bit more code for you to do.