I run local streamlit app and have some folder structure like:
./
core/
utills/
ui/
Windows 10
Streamlit, version 1.27.2
Python 3.11.4
When I change file in root folder - all is fine. It detects changes and rebuild app. I see all changes.
But when I change something in core or core/utils folder I have a problem - it detects changes and ask to re-run app, but didn’t compile it and I have to click Refresh button in browser to re-build changes.
First of all: Kudos to the Streamlit team. It’s a really powerful framework.
Having said that, I too am seeing this phenomenon: code changes on the toplevel script DO trigger reload / rerun; however, code changes in subdirectories FAIL to trigger streamlit to reload / rerun even when refreshing the web browser. To see the effects of my code changes I need to stop and then re-run streamlit. My project’s .streamlit/config.toml has the following:
This is running Streamlit 1.30.0 on an Ubuntu 16.04 system with Python 3.10 and with Watchdog python module installed.
Any suggestions on how to resolve? I’ve noticed other online comments suggesting the same issue, so I’m not alone with this problem. And it is time-consuming to have to repeatedly stop and re-launch streamlit in order to see the effects of my many code changes.
Please help address this bug or provide a workaround.
Thanks
I noticed from the Changelog that Streamlit Version 1.2.0, Release date: Nov 11, 2021, claimed a new feature “Streamlit can auto-reload when files in sub-directories change” Is it possible this feature was not fully tested on a range of environments, or perhaps a regression has crept into the code since that release?
Now problem is even more critical. After some period I see that source is not build at all. Just I change files, but still the same. I can have bugs, wrong code, but still it works as before. I only see changes after full restart.