After clicking stop button, some requests cannot be executed, including switching pages, submit st.text_input

Summary

After clicking st.stop(), some requests cannot be executed, including switching pages and executing background functions. There is no response to clicking.

Steps to reproduce

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, submit st.text_input and re-executing functions. There is no response to clicking.
Code snippet:

add code here

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.

Links

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

Additional information

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

Hi @king007

Using st.stop() would cause Streamlit to not run any statements as it stops execution immediately.

More info on the Docs page:

If you’d like to have the app continue running then please replace st.stop() with a warning message instead such as using st.warning().

Hope this helps!

Because my user got impatient because he waited too long, he clicked the stop button, which may prevent other users from using the app.

So, is there a way to remove this stop button, or replace this stop button with something else.

Hi,

Yes, you’ll want to remove the hamburger menu in order to do that. In doing so, not only will the stop button be removed but also the running notification on the same top bar.

This forum post should get you started:

And this too:

Thanks! Either way, it looks like there’s no obvious benefit. Therefore, I decided not to deal with it for the time being

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