File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,16 @@ def wrap_express_app(file: Path) -> App:
3939 )
4040
4141 app_ui = run_express (file )
42+ try :
43+ # We tagify here, instead of waiting for the App object to do it when it wraps
44+ # the UI in a HTMLDocument and calls render() on it. This is because
45+ # AttributeErrors can be thrown during the tagification process, and we need to
46+ # catch them here and convert them to a different type of error, because uvicorn
47+ # specifically catches AttributeErrors and prints an error message that is
48+ # misleading for Shiny Express. https://github.com/posit-dev/py-shiny/issues/937
49+ app_ui = run_express (file ).tagify ()
50+ except AttributeError as e :
51+ raise RuntimeError (e ) from e
4252
4353 def express_server (input : Inputs , output : Outputs , session : Session ):
4454 try :
You can’t perform that action at this time.
0 commit comments