Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions shiny/express/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ def wrap_express_app(file: Path) -> App:
)

app_ui = run_express(file)
try:
# We tagify here, instead of waiting for the App object to do it when it wraps
# the UI in a HTMLDocument and calls render() on it. This is because
# AttributeErrors can be thrown during the tagification process, and we need to
# catch them here and convert them to a different type of error, because uvicorn
# specifically catches AttributeErrors and prints an error message that is
# misleading for Shiny Express. https://github.com/posit-dev/py-shiny/issues/937
app_ui = run_express(file).tagify()
except AttributeError as e:
raise RuntimeError(e) from e

def express_server(input: Inputs, output: Outputs, session: Session):
try:
Expand Down