streamlit-analytics icon indicating copy to clipboard operation
streamlit-analytics copied to clipboard

ReportThread - ModuleNotFoundError

Open trsavi opened this issue 3 years ago • 12 comments

ReportThread seems to not be working with new version of streamlit (1.5.0.), I got ModuleNotFoundError. When I changed the source code in session_state.py and commented lines for importing report_thread and also disregarded ctx (ctx = ReportThread.get_report_ctx()) variable throughout the script I avoided error on local machine and everything worked fine (I could see basic statistics) but when I deploy it onto streamlit share framework error appeared once again. Any thoughts on this?

trsavi avatar Feb 01 '22 12:02 trsavi

please pull request the necessary changes so we can all enjoy the correction.

chanansh avatar Feb 02 '22 09:02 chanansh

@jrieke please help correct this.

chanansh avatar Feb 02 '22 09:02 chanansh

An easy fix to this has already been posted. https://discuss.streamlit.io/t/modulenotfounderror-no-module-named-streamlit-report-thread/20983/7?u=riyad_parvez

riyadparvez avatar Feb 16 '22 03:02 riyadparvez

This will be fixed by #16 or #12.

Until one of the PRs is merged, you can install one of the forks, e.g., pip install git+https://github.com/yanirs/streamlit-analytics.

yanirs avatar Feb 18 '22 00:02 yanirs

+1 on this. Same issue on sample code with latest python.

harishkashyap avatar Mar 10 '22 01:03 harishkashyap

Any plans to fix this soon?

alaturqua avatar Apr 11 '22 12:04 alaturqua

+1, same issue

Edit: Found suggestion by Velicanu in link below resolved:

https://discuss.streamlit.io/t/module-not-found-reportthread/5657/6

corticalstack avatar Apr 25 '22 07:04 corticalstack

any news about this one ? i saw there is a more recent attempt also here: https://github.com/jrieke/streamlit-analytics/pull/18

TTRh avatar May 13 '22 14:05 TTRh

This will be fixed by #16 or #12.

Until one of the PRs is merged, you can install one of the forks, e.g., pip install git+https://github.com/yanirs/streamlit-analytics.

Thanks I have tested you code, it works in streamlit 1.4, but getting another import error in 1.8

standard-outlier avatar Jun 17 '22 12:06 standard-outlier

@yanirs I tried with your repo but unfortunately, it didn't work. I had to add these modifications to make it work for streamlit 1.8:

https://github.com/jrieke/streamlit-analytics/compare/main...franasal:streamlit-analytics:main and added it to my requirements.txt:

git+https://github.com/franasal/streamlit-analytics

franasal avatar Jul 28 '22 13:07 franasal

Yeah, looks like this project isn't being maintained so I'm not using it. It'll probably break again with new Streamlit versions, unless it's actively maintained.

yanirs avatar Jul 28 '22 21:07 yanirs

This should either be supported, or be available by default as part of all versions of Streamlit.

fredzannarbor avatar Aug 10 '22 22:08 fredzannarbor

Hey, sorry for the super long delay. I never had time to come around to this. I changed the implementation to work with st.session_state now, so it should be a lot more stable. Check out release 0.4.1, it's tested with Streamlit 1.13.0. (Note that the minimum Streamlit version is now 0.84.0).

jrieke avatar Oct 26 '22 15:10 jrieke