Rebuild all changed files

I run local streamlit app and have some folder structure like:

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?

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:


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.

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?

1 Like

Same bug for me. Please keep this thread open until a resolution is found :slight_smile:

Yes, it’s still here.

Hello, I have the problem of not reloading modules when changes occur on v1.33.0 and would just like to share what I have found.

Reloading a module in a parent or sibling directory to that of the app does not work. Your module needs to be in or below the main app’s file. I don’t believe this was always the case as it has recently broken for me. Previously, changes to the module would trigger a reload no matter the location.