Streamlit.script_run_context() gone with 1.8?

Hi,

wenn using threading I understood to run a thread inside a streamlit context I need to
add the Thread to a context.
ala:
t = Thread(target=prepare_pd_threaded, args=(x, pd_dict))
add_script_run_ctx(t)

Recently the function changed from add_report_ctx() to add_script_run_ctx().
With latest version 1.8 it changed again:

ModuleNotFoundError: No module named ‘streamlit.script_run_context’

Any hints?

thx

I have the same problem, it breaks this code here:

Change the import from

#v1.7.0
from streamlit.script_run_context import get_script_run_ctx

to

#v1.8.0
from streamlit.scriptrunner.script_run_context import get_script_run_ctx
2 Likes

Thanks a lot - that works :+1: