Skip to content

Commit 2857af9

Browse files
committed
Fix bug with 'engine' parameter in JSON decoding for plotly
1 parent 75b794f commit 2857af9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simvue/serialization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def _serialize_matplotlib(data: typing.Any) -> typing.Optional[tuple[str, str]]:
109109
except ImportError:
110110
return None
111111
mimetype = "application/vnd.plotly.v1+json"
112-
data = plotly.io.to_json(plotly.tools.mpl_to_plotly(data.gcf()), "json")
112+
data = plotly.io.to_json(plotly.tools.mpl_to_plotly(data.gcf()), engine="json")
113113
return data, mimetype
114114

115115

@@ -120,7 +120,7 @@ def _serialize_matplotlib_figure(data: typing.Any) -> typing.Optional[tuple[str,
120120
except ImportError:
121121
return None
122122
mimetype = "application/vnd.plotly.v1+json"
123-
data = plotly.io.to_json(plotly.tools.mpl_to_plotly(data), "json")
123+
data = plotly.io.to_json(plotly.tools.mpl_to_plotly(data), engine="json")
124124
return data, mimetype
125125

126126

0 commit comments

Comments
 (0)