Super simple streamlit app reruns on start (side/effect), not clear why

I just have this simple streamlit

import streamlit as st


st.write("# Welcome to Streamlit! πŸ‘‹")

st.sidebar.success("Select a demo above.")

    Streamlit is an open-source app framework built specifically for
    Machine Learning and Data Science projects.
    **πŸ‘ˆ Select a demo from the sidebar** to see some examples
    of what Streamlit can do!
    ### Want to learn more?
    - Check out [](
    - Jump into our [documentation](
    - Ask a question in our [community
    ### See more complex demos
    - Use a neural net to [analyze the Udacity Self-driving Car Image
    - Explore a [New York City rideshare dataset](


I run it with streamlit run,
however, I am seeing that the haha prints between 2 to 4 times…
Should I expect that it should only be called once? What is causing the rerun?

:rotating_light: Before clicking β€œCreate Topic”, please make sure your post includes the following information (otherwise, the post will be locked). :rotating_light:

  1. Are you running your app locally or is it deployed?
  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform?
    b. Share the link to the public deployed app.
  3. Share the link to your app’s public GitHub repository (including a requirements file).
  4. Share the full text of the error message (not a screenshot).
  5. Share the Streamlit and Python versions.

Hi @hackgoofer

Typically, when there’s widget interaction, these would trigger an app re-run. Were there also other widgets in the sidebar?

Hi @hackgoofer,

haha prints only once for me. Maybe, you could either try:

  1. closing your DOS & browser windows of your streamlit app and reload your app again to check
  2. If that fails, re-install streamlit


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