# \#rerun

**URL:** https://discuss.streamlit.io/tag/rerun/140.md

[Latest](https://discuss.streamlit.io/latest.md) · [Categories](https://discuss.streamlit.io/categories.md) · [Tags](https://discuss.streamlit.io/tags.md)

---

## [Triggering fragment rerun from full scope rerun](https://discuss.streamlit.io/t/triggering-fragment-rerun-from-full-scope-rerun/121381)

<div class="topic-metadata">

**Author:** [@David96](https://discuss.streamlit.io/u/David96)\
**Replies:** 2\
**Last updated:** [April 29, 2026, 9:59am UTC](https://discuss.streamlit.io/t/triggering-fragment-rerun-from-full-scope-rerun/121381 "2026-04-29T09:59:27Z")

</div>

Hello, Here is my use case : In my app I want the user to be able to track the status of a thing. To do this I have a fragment that makes an api call and displays the result on screen, at first I want that fragment to …

---

## [Avoiding complete reruns during the plotly events like mouse clicks on the graphs](https://discuss.streamlit.io/t/avoiding-complete-reruns-during-the-plotly-events-like-mouse-clicks-on-the-graphs/119819)

<div class="topic-metadata">

**Author:** [@Shashidhar1](https://discuss.streamlit.io/u/Shashidhar1)\
**Replies:** 3\
**Last updated:** [October 19, 2025, 7:21am UTC](https://discuss.streamlit.io/t/avoiding-complete-reruns-during-the-plotly-events-like-mouse-clicks-on-the-graphs/119819 "2025-10-19T07:21:19Z")

</div>

First post :slight\_smile: Hi Streamlit community, I’m working on an interactive Streamlit dashboard using st.plotly\_chart, but I’ve run into an issue with rerun behavior. Whenever a user interacts with a widget or a Pl…

---

## [Help with st.text\_input reruns](https://discuss.streamlit.io/t/help-with-st-text-input-reruns/119241)

<div class="topic-metadata">

**Author:** [@Kris4](https://discuss.streamlit.io/u/Kris4)\
**Replies:** 3\
**Last updated:** [September 2, 2025, 12:11am UTC](https://discuss.streamlit.io/t/help-with-st-text-input-reruns/119241 "2025-09-02T00:11:30Z")

</div>

I’m encountering a perplexing behavior with st.text\_input where the page doesn’t seem to be completely rerunning after a value change. I think it’s best explained with this simple code: import streamlit as st class Mes…

---

## [How to save widget value to URL without triggering re-run?](https://discuss.streamlit.io/t/how-to-save-widget-value-to-url-without-triggering-re-run/113714)

<div class="topic-metadata">

**Author:** [@quantoid](https://discuss.streamlit.io/u/quantoid)\
**Replies:** 0\
**Last updated:** [May 29, 2025, 9:41am UTC](https://discuss.streamlit.io/t/how-to-save-widget-value-to-url-without-triggering-re-run/113714 "2025-05-29T09:41:45Z")

</div>

I’ve created some wrapper classes that implement stuff we want around all our input widgets. That includes getting defaults from URL parameters using st.query\_param so that we can share links with default values, setting…

---

## [Streamlit does not rerun on script change](https://discuss.streamlit.io/t/streamlit-does-not-rerun-on-script-change/113182)

<div class="topic-metadata">

**Author:** [@Rich2](https://discuss.streamlit.io/u/Rich2)\
**Replies:** 1\
**Last updated:** [May 21, 2025, 10:30pm UTC](https://discuss.streamlit.io/t/streamlit-does-not-rerun-on-script-change/113182 "2025-05-21T22:30:49Z")

</div>

I’m just getting started using streamlit. I’m testing a very simple script: import streamlit as st ''' # Import Required libs ''' with st.echo(): from hyperscope import config import polars as pl import num…

---

## [How to correctly save data\_editor changes before button actions](https://discuss.streamlit.io/t/how-to-correctly-save-data-editor-changes-before-button-actions/108261)

<div class="topic-metadata">

**Author:** [@Nathan12](https://discuss.streamlit.io/u/Nathan12)\
**Replies:** 2\
**Last updated:** [April 16, 2025, 9:37am UTC](https://discuss.streamlit.io/t/how-to-correctly-save-data-editor-changes-before-button-actions/108261 "2025-04-16T09:37:48Z")

</div>

Hello Streamlit community, I’m facing a challenging issue with my Streamlit app that involves a data\_editor and action buttons. My goal is to prevent users from clicking action buttons while they’re in the middle of edi…

---

## [How to prevent streamlit app from rerunning when widgets are interacted with?](https://discuss.streamlit.io/t/how-to-prevent-streamlit-app-from-rerunning-when-widgets-are-interacted-with/91924)

<div class="topic-metadata">

**Author:** [@William\_Garrard](https://discuss.streamlit.io/u/William_Garrard)\
**Replies:** 11\
**Last updated:** [February 7, 2025, 8:17am UTC](https://discuss.streamlit.io/t/how-to-prevent-streamlit-app-from-rerunning-when-widgets-are-interacted-with/91924 "2025-02-07T08:17:19Z")

</div>

I am developing a Streamlit app within Snowflake. It is very basic. I have a button that runs a db query, gets a dataframe, and shows it in a data editor widget. I quickly discovered that as soon as I made one change …

---

## [Rerun causes widget value to reset in python but not in browser](https://discuss.streamlit.io/t/rerun-causes-widget-value-to-reset-in-python-but-not-in-browser/85590)

<div class="topic-metadata">

**Author:** [@Jesper](https://discuss.streamlit.io/u/Jesper)\
**Replies:** 2\
**Last updated:** [January 5, 2025, 6:09am UTC](https://discuss.streamlit.io/t/rerun-causes-widget-value-to-reset-in-python-but-not-in-browser/85590 "2025-01-05T06:09:07Z")

</div>

The value displayed in the widget and the value returned by the widget get out of sync. Is this a bug, or am I doing something wrong? import streamlit as st if st.button("rerun"): st.rerun() value = st.selectbox("…

---

## [How to build a scroll to bottom button and how to focus chat\_input when page starts](https://discuss.streamlit.io/t/how-to-build-a-scroll-to-bottom-button-and-how-to-focus-chat-input-when-page-starts/88350)

<div class="topic-metadata">

**Author:** [@Vishwas1](https://discuss.streamlit.io/u/Vishwas1)\
**Replies:** 0\
**Last updated:** [December 26, 2024, 7:17pm UTC](https://discuss.streamlit.io/t/how-to-build-a-scroll-to-bottom-button-and-how-to-focus-chat-input-when-page-starts/88350 "2024-12-26T19:17:14Z")

</div>

I am building a streamlit chat bot app,the app is almost done but i need to add scroll to bottom button and when ever i am reading above conversations and give prompt in chat input the app doesn’t scroll along with the…

---

## [Bug ? with multiselect + rerun](https://discuss.streamlit.io/t/bug-with-multiselect-rerun/83691)

<div class="topic-metadata">

**Author:** [@Sarnath\_K](https://discuss.streamlit.io/u/Sarnath_K)\
**Replies:** 5\
**Last updated:** [December 5, 2024, 12:38pm UTC](https://discuss.streamlit.io/t/bug-with-multiselect-rerun/83691 "2024-12-05T12:38:51Z")

</div>

If you’re creating a debugging post, please include the following info: Are you running your app locally or is it deployed? Locally Share the Streamlit and Python versions. Streamlit 1.39.0 Python 3.9.18 I ha…

---

## [Way to find out what triggered a rerun](https://discuss.streamlit.io/t/way-to-find-out-what-triggered-a-rerun/77870)

<div class="topic-metadata">

**Author:** [@Tian](https://discuss.streamlit.io/u/Tian)\
**Replies:** 6\
**Last updated:** [November 11, 2024, 9:01pm UTC](https://discuss.streamlit.io/t/way-to-find-out-what-triggered-a-rerun/77870 "2024-11-11T21:01:45Z")

</div>

Hello everyone, I have a fairly complex Streamlit App with a lot of code. I have noticed that the pages loads twice on the first visit: Meaning once a users visits the app the first time the interface loads then clears …

---

## [Bind view to Singleton attribute](https://discuss.streamlit.io/t/bind-view-to-singleton-attribute/84391)

<div class="topic-metadata">

**Author:** [@Thomas8](https://discuss.streamlit.io/u/Thomas8)\
**Replies:** 1\
**Last updated:** [November 4, 2024, 3:25am UTC](https://discuss.streamlit.io/t/bind-view-to-singleton-attribute/84391 "2024-11-04T03:25:26Z")

</div>

Context Hi, I am trying to develop a graph viz with a Python backend. The graph in itself is rendered through html+js (using vis.js library). I simplified the issue I am having for the sake of clarity. The architectura…

---

## [How to avoid rerun of script in Streamlit whicle clicking button](https://discuss.streamlit.io/t/how-to-avoid-rerun-of-script-in-streamlit-whicle-clicking-button/81529)

<div class="topic-metadata">

**Author:** [@ajjayakumar](https://discuss.streamlit.io/u/ajjayakumar)\
**Replies:** 0\
**Last updated:** [September 19, 2024, 5:28am UTC](https://discuss.streamlit.io/t/how-to-avoid-rerun-of-script-in-streamlit-whicle-clicking-button/81529 "2024-09-19T05:28:51Z")

</div>

st.session\_state.suggestions = get\_suggestions(user\_query, api\_key, model\_name, model\_params) logging.info(f"Suggestions for initial user query are {st.session\_state.suggestions}“) while st.session\_state.suggestions: …

---

## [Streamlit\_card card object sesssion state is not getting updated properly](https://discuss.streamlit.io/t/streamlit-card-card-object-sesssion-state-is-not-getting-updated-properly/64754)

<div class="topic-metadata">

**Author:** [@rama](https://discuss.streamlit.io/u/rama)\
**Replies:** 1\
**Last updated:** [August 8, 2024, 7:03am UTC](https://discuss.streamlit.io/t/streamlit-card-card-object-sesssion-state-is-not-getting-updated-properly/64754 "2024-08-08T07:03:27Z")

</div>

I am trying to use the streamlit\_card’s card object to show the sample prompts from various domains in the UI. When the user clicks on the card, the prompt in the text part goes to the LLM and the output is displayed usi…

---

## [Identifying Inconsistent Page Reruns with Buttons](https://discuss.streamlit.io/t/identifying-inconsistent-page-reruns-with-buttons/72217)

<div class="topic-metadata">

**Author:** [@Jake1](https://discuss.streamlit.io/u/Jake1)\
**Replies:** 6\
**Last updated:** [June 17, 2024, 12:39am UTC](https://discuss.streamlit.io/t/identifying-inconsistent-page-reruns-with-buttons/72217 "2024-06-17T00:39:07Z")

</div>

This is way too long for a reasonable question. For a quick summary: two functions exist, very extremely similar to one another. One causes entire page to reload, the other doesn’t. Details on the code causing the behav…

---

## [@st.experimental\_dialog problem with st.rerun](https://discuss.streamlit.io/t/st-experimental-dialog-problem-with-st-rerun/71203)

<div class="topic-metadata">

**Author:** [@a.guerrisi2](https://discuss.streamlit.io/u/a.guerrisi2)\
**Replies:** 4\
**Last updated:** [June 4, 2024, 2:50pm UTC](https://discuss.streamlit.io/t/st-experimental-dialog-problem-with-st-rerun/71203 "2024-06-04T14:50:53Z")

</div>

Hi everyone, I’m using the @st.experiment\_dialog decorator for a function that shows me a text input widget to set a name of a map’s area already selected. The function update\_session\_state() sets multiple values that a…

---

## [Session state does not function without 'streamlit run' when I convert the app to an exe and run it](https://discuss.streamlit.io/t/session-state-does-not-function-without-streamlit-run-when-i-convert-the-app-to-an-exe-and-run-it/68770)

<div class="topic-metadata">

**Author:** [@kk09](https://discuss.streamlit.io/u/kk09)\
**Replies:** 1\
**Last updated:** [May 18, 2024, 10:07am UTC](https://discuss.streamlit.io/t/session-state-does-not-function-without-streamlit-run-when-i-convert-the-app-to-an-exe-and-run-it/68770 "2024-05-18T10:07:15Z")

</div>

I tried converting my streamlit app to an .exe file, but after converting the file, I tried to open it and there was an error in my terminal saying that "Session state does not function when running a script without ‘str…

---

## [Unexpected reruns when deployed to AKS](https://discuss.streamlit.io/t/unexpected-reruns-when-deployed-to-aks/56884)

<div class="topic-metadata">

**Author:** [@puzzylord](https://discuss.streamlit.io/u/puzzylord)\
**Replies:** 3\
**Last updated:** [May 15, 2024, 6:28am UTC](https://discuss.streamlit.io/t/unexpected-reruns-when-deployed-to-aks/56884 "2024-05-15T06:28:11Z")

</div>

Hi I am working on several Streamlit apps to be deployed on AKS with an application gateway ingress controller. My problem is that the apps seem to spontaneously rerun at irregular intervals, anything form every few se…

---

## [St.text\_input will only return an emptystring after an st.rerun, until another re-run](https://discuss.streamlit.io/t/st-text-input-will-only-return-an-emptystring-after-an-st-rerun-until-another-re-run/68932)

<div class="topic-metadata">

**Author:** [@GavinTryz](https://discuss.streamlit.io/u/GavinTryz)\
**Replies:** 0\
**Last updated:** [May 7, 2024, 9:31pm UTC](https://discuss.streamlit.io/t/st-text-input-will-only-return-an-emptystring-after-an-st-rerun-until-another-re-run/68932 "2024-05-07T21:31:03Z")

</div>

I am running this app locally: import streamlit as st st.button("A button that should do nothing!") ####################################################################### st.divider() # Something unrelated to my …

---

## [App rerun on a component hit (even after involving session state)](https://discuss.streamlit.io/t/app-rerun-on-a-component-hit-even-after-involving-session-state/62268)

<div class="topic-metadata">

**Author:** [@sathyapriyaa-sketch](https://discuss.streamlit.io/u/sathyapriyaa-sketch)\
**Replies:** 0\
**Last updated:** [February 13, 2024, 1:25pm UTC](https://discuss.streamlit.io/t/app-rerun-on-a-component-hit-even-after-involving-session-state/62268 "2024-02-13T13:25:03Z")

</div>

from langchain.chains import RetrievalQA from langchain.chat\_models import ChatOpenAI from langchain.document\_loaders import TextLoader from langchain.vectorstores import DocArrayInMemorySearch from IPython.display i…

---

## [Whole app is being re-run after 25-30 minutes of running in streamlit cloud](https://discuss.streamlit.io/t/whole-app-is-being-re-run-after-25-30-minutes-of-running-in-streamlit-cloud/60460)

<div class="topic-metadata">

**Author:** [@Jayanth](https://discuss.streamlit.io/u/Jayanth)\
**Replies:** 4\
**Last updated:** [February 9, 2024, 6:08am UTC](https://discuss.streamlit.io/t/whole-app-is-being-re-run-after-25-30-minutes-of-running-in-streamlit-cloud/60460 "2024-02-09T06:08:17Z")

</div>

I have an chat application that takes more than 30 minutes to run, i.e continuous messages will be sent from backend for more than 30 minutes. At the time period between 26-30 minutes into the running, the app re-runs wi…

---

## [Embedding refresh avoid](https://discuss.streamlit.io/t/embedding-refresh-avoid/58162)

<div class="topic-metadata">

**Author:** [@GabiAnt95](https://discuss.streamlit.io/u/GabiAnt95)\
**Replies:** 2\
**Last updated:** [February 3, 2024, 10:39pm UTC](https://discuss.streamlit.io/t/embedding-refresh-avoid/58162 "2024-02-03T22:39:40Z")

</div>

Hi, im working with a local host app and have been trying to troubleshoot this for days: The App is simple, it just takes as input some model and looker data (A BI Tool) and a User Request and based on these inputs retu…

---

## [Code comparision in streamlit](https://discuss.streamlit.io/t/code-comparision-in-streamlit/55946)

<div class="topic-metadata">

**Author:** [@Pracharitha](https://discuss.streamlit.io/u/Pracharitha)\
**Replies:** 1\
**Last updated:** [November 22, 2023, 2:59pm UTC](https://discuss.streamlit.io/t/code-comparision-in-streamlit/55946 "2023-11-22T14:59:06Z")

</div>

Currently, I am working on the code converter application in Streamlit, in that I am integrating the code mirror(React) into the Streamlit application. I am using the deployed react URL of the code mirror into the stream…

---

## [Why reruning script doeas not reset the widget?](https://discuss.streamlit.io/t/why-reruning-script-doeas-not-reset-the-widget/51299)

<div class="topic-metadata">

**Author:** [@Vuksan\_Mijovic](https://discuss.streamlit.io/u/Vuksan_Mijovic)\
**Replies:** 7\
**Last updated:** [September 11, 2023, 5:43pm UTC](https://discuss.streamlit.io/t/why-reruning-script-doeas-not-reset-the-widget/51299 "2023-09-11T17:43:42Z")

</div>

This piece of code is writing text from text\_area into above the text area. import streamlit as st def update(): if "text\_area" in st.session\_state: st.write(st.session\_state.text\_area) else: st…

---

## [How to solve after clicking stop button, some requests cannot be executed](https://discuss.streamlit.io/t/how-to-solve-after-clicking-stop-button-some-requests-cannot-be-executed/49734)

<div class="topic-metadata">

**Author:** [@king007](https://discuss.streamlit.io/u/king007)\
**Replies:** 2\
**Last updated:** [August 22, 2023, 1:03pm UTC](https://discuss.streamlit.io/t/how-to-solve-after-clicking-stop-button-some-requests-cannot-be-executed/49734 "2023-08-22T13:03:32Z")

</div>

Some functions of my app take a long time to execute, more than one minute. So, I clicked the stop button. After clicking stop button, some requests cannot be executed, including switching pages and executing backgro…

---

## [Avoid to rerun certain parts of code](https://discuss.streamlit.io/t/avoid-to-rerun-certain-parts-of-code/43606)

<div class="topic-metadata">

**Author:** [@robert.k](https://discuss.streamlit.io/u/robert.k)\
**Replies:** 0\
**Last updated:** [May 20, 2023, 12:06am UTC](https://discuss.streamlit.io/t/avoid-to-rerun-certain-parts-of-code/43606 "2023-05-20T00:06:10Z")

</div>

import streamlit as st from streamlit\_timeline import st\_timeline items = \[ {'start': '2023-05-01T00:00', 'end': '2023-05-05T24:00', 'group': 1} \] groups = \[ {'id': 'ExpandableGroup', 'nestedGroups': \['FurtherE…
