Skip to content

Commit

Permalink
add stacktrace to generic error tab
Browse files Browse the repository at this point in the history
  • Loading branch information
rsxdalv committed Jul 24, 2024
1 parent 1bc28c7 commit 733f2ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# %%
import os
import traceback
import src.utils.setup_or_recover as setup_or_recover
import src.utils.dotenv_init as dotenv_init
import gradio as gr
Expand Down Expand Up @@ -52,6 +53,10 @@ def generic_error_tab(e, name="", id=""):
with gr.Tab(name + " (!)", id=id):
gr.Markdown(f"""Failed to load {name} tab. Please check your configuration.""")
gr.Markdown(f"""Error: {e}""")
gr.Markdown(f"""Stacktrace: {traceback.format_exc()}""")
print(f"Failed to load {name} tab. Please check your configuration.")
print(f"Error: {e}")
print(f"Stacktrace: {traceback.format_exc()}")


with gr.Blocks(
Expand Down

0 comments on commit 733f2ae

Please sign in to comment.