Hello,
In one of my repos i was using
from streamlit.report_thread import REPORT_CONTEXT_ATTR_NAME
But now i’m getting an error.
ModuleNotFoundError: No module named 'streamlit.report_thread'
Did the syntax change? where can i see how to fix it or what do i need to change to? I don’t see any reference to it anywhere.
I also have the same error.
Does anyone know how to fix?
Thanks,
It’s crazy that there’s no solution to this in 2023.
streamlit:develop ← streamlit:feature/report-refactor
opened 06:45PM - 07 Dec 21 UTC
Still needs some threading documentation (and maybe explicitly guard against use… r scripts violating threading requirements?), AppSession constructor cleanup, and a pile of misc report references in variable/parameter names and documentation.
Without digging into it deeply, it would seem “report” became “script_run” in general.
Right, @mathcatsand , but I still get error Cannot find reference 'ReportThread' in '__init__.py' when trying to write from streamlit.ReportThread. That’s the main issue.
As noted in the linked pull request. “ReportThread” no longer exists. It was an internal API, subject to change without notice, and not supported.
streamlit:develop ← streamlit:feature/report-refactor
Hi @richlysakowski - `streamlit.report_thread` was an internal API. We don't rec… ommend that devs use internal APIs, because they're subject to change without notice, and we don't provide support for them. (In this case, ReportThread no longer exists.)
If you're looking to create additional threads within your Streamlit app, you can do this with the built-in Python thread class, but note that it is _not safe_ to call streamlit APIs from other threads. (If you want to issue Streamlit commands from another thread, you could e.g. have that thread enqueue requests to a shared queue that your script's thread processes.)
I see. So how do we tackle the “missing ReportContext” threading error?
system
Closed
February 28, 2024, 1:17am
9
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.