Clear cache not working (Thread 'MainThread': missing ScriptRunContext)

Summary

When trying to clear the cache, using the C button, Streamlit generates the following error: Thread 'MainThread': missing ScriptRunContext. This happens both locally and on the Streamlit Cloud.

Debug info

  • Streamlit version: 1.18.1
  • Python version: 3.19.16
  • Using Conda on local machine
  • OS version: MacOS (M1)
  • Browser version: Google Chrome

Requirements file

streamlit==1.18.1
loguru==0.6.0"
pyarrow==11.0.0
pandas==1.5.3
adlfs==0.7.7
tomli==2.0.1

Links

It’s a private repo

Hey @sTomerG,

Thanks for sharing your question! Sorry for the delayed response on this.

I understand that the repo is private, but can you share a minimal code snippet so we can try to reproduce the error? Also, does the error persist when you upgrade to 1.22.0?