App in local host not detecting change in source code

app in local host not detecting change in source code

1 Like

Hi @HIMANSHU

Typically, saving the app source code should trigger a rerun. You can explicitly define this by adding

[server]

runOnSave=True

More info in the Docs Configuration<!-- --> - Streamlit Docs

1 Like

thanks. will try

2 Likes

Hello, I am having the same problem, but it is not solved by setting β€œrunOnSave = true” in ~/.streamlit/config.toml. When I go to Settings, Run on Save is checked. Refreshing the browser does not help; I have to restart the server to see changes. This applies to the top level app, just only subpages.

  • Streamlit 1.31.1
  • Python 3.11.0 venv
  • MacOS 14.2.1

Any help appreciated.

1 Like

I solved it by installing Streamlit in a new venv. Is is working now because the venv is inside the Streamlit directory? It wasn’t before.

1 Like