Sometimes input widgets/buttons are repeated on same page...we get rid by clearing chache


sometimes input widgets/buttons are repeated on same page…we get rid by clearing cache. other times it doesn’t cause any problem, not able to figure what particular situation leads to it…its happening since months…upgrading regularly to latest version of streamlit. mysetup is windows7, mongodb on localhost, multipage streamlit webapp

Steps to reproduce

Code snippet:

st.markdown('Will share code of page when problem happens next time')

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

Explain what you expect to happen when you run the code above.

Actual behavior:

Explain the undesired behavior or error you see when you run the code above.
If you’re seeing an error message, share the full contents of the error message here.

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: (get it with $ python --version)
  • Using Conda? PipEnv? PyEnv? Pex?
  • OS version:
  • Browser version:

Requirements file

Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.


  • Link to your GitHub repo:
  • Link to your deployed app:

Additional information

If needed, add any other context about the problem here.

Without seeing you code, I can only take some wild guesses. Generally, I’d avoid using widgets inside cached functions. There is some experimental support for it, but it is just that–experimental.

If you use any callbacks, I’d also avoid including widgets there, too. Callback functions will write to the top of the page before the next script run, but whatever is written by a callback will immediately disappear.

If you could post your code or a link to your GitHub repository, maybe someone will be able to see something to point out.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.