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.
Is there way to re-build app after any changes?
1 Like
Hi @Pavel_Agurov
You can activate the runOnSave
parameter in .streamlit/config.toml
to True as follows:
runOnSave = true
This should allow the app to automatically refresh upon saving the app .py file
Hope this helps!
Thanks for answer! I have this options in True. But it only works for root folder (and it seems for one subfolder). Can’t find changes in sub-folders.
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:
[server]
headless = true
runOnSave = true
allowRunOnSave = true
fastReruns = true
fileWatcherType = "auto"
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?
2 Likes
Same bug for me. Please keep this thread open until a resolution is found
1 Like
Same Problem here did anybody found a solution for this?
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.
2 Likes