File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,22 @@ def as_widget_plotly(x: object) -> Optional[Widget]:
78
78
def as_widget_pydeck (x : object ) -> Optional [Widget ]:
79
79
if not hasattr (x , "show" ):
80
80
raise TypeError (
81
- f"Don't know how to coerce { x } (a pydeck object) into an ipywidget without a .show() method."
81
+ f"Don't know how to coerce { type ( x ) } (a pydeck object) into an ipywidget without a .show() method."
82
82
)
83
83
84
- return x .show () # type: ignore
84
+ res = x .show () # type: ignore
85
+
86
+ if not isinstance (res , Widget ):
87
+ raise TypeError (
88
+ "pydeck v0.9 removed ipywidgets support, thus it no longer works with "
89
+ "shinywidgets. Consider either downgrading to pydeck v0.8.0 or using shiny's "
90
+ "@render.ui decorator to display the map (and return Deck.to_html() in "
91
+ "that render function). Note that the latter strategy means you won't be "
92
+ "able to programmatically .update() the map or access user events."
93
+ "For more, see https://github.com/visgl/deck.gl/pull/8854"
94
+ )
95
+
96
+ return res # type: ignore
85
97
86
98
87
99
AS_WIDGET_MAP = {
You can’t perform that action at this time.
0 commit comments