From 7adecea32a64dd08dd344ee3bbabcbb0efe3a87b Mon Sep 17 00:00:00 2001 From: ZeroCool940711 Date: Tue, 23 Aug 2022 22:05:12 -0700 Subject: [PATCH] Changed st.script_runner.StopException to st.StopException as this is the way to access this exception on the newest version of the library. --- diffusion_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diffusion_app.py b/diffusion_app.py index 795f881..c3f1866 100644 --- a/diffusion_app.py +++ b/diffusion_app.py @@ -100,7 +100,7 @@ def generate_image( frames = [] try: - # Try block catches st.script_runner.StopExecution, no need of a dedicated stop button + # Try block catches st.StopExecution, no need of a dedicated stop button # Reason is st.form is meant to be self-contained either within sidebar, or in main body # The way the form is implemented in this app splits the form across both regions # This is intended to prevent the model settings from crowding the main body @@ -181,7 +181,7 @@ def generate_image( status_text.text("Done!") # End of run - except st.script_runner.StopException as e: + except st.StopException as e: # Dump output to dashboard print(f"Received Streamlit StopException") status_text.text("Execution interruped, dumping outputs ...")