File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88## [ UNRELEASED]
99
1010* Fixed an issue where widgets would sometimes fail to render in a Quarto document. (#159 )
11+ * Fixed an issue where importing shinywidgets before a ipywidget implementation can sometimes error in a Shiny Express app. (#163 )
1112
1213## [ 0.3.3] - 2024-08-13
1314
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ def init_shiny_widget(w: Widget):
4545 raise RuntimeError (
4646 "shinywidgets requires that all ipywidgets be constructed within an active Shiny session"
4747 )
48+ # Wait until we're in a "real" session before doing anything
49+ # (i.e., on the 1st run of an Express app, it's too early to do anything)
50+ if session .is_stub_session ():
51+ return
4852 # Break out of any module-specific session. Otherwise, input.shinywidgets_comm_send
4953 # will be some module-specific copy.
5054 while hasattr (session , "_parent" ):
You can’t perform that action at this time.
0 commit comments