File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1212
1313import choreographer as choreo
1414import logistro
15- from choreographer import channels
1615from choreographer .errors import ChromeNotFoundError
1716from choreographer .utils import TmpDirectory
18- from plotly .utils import PlotlyJSONEncoder
1917
2018from ._fig_tools import _is_figurish , build_fig_spec
2119from ._kaleido_tab import _KaleidoTab
3028
3129_logger = logistro .getLogger (__name__ )
3230
33- channels .register_custom_encoder (PlotlyJSONEncoder )
31+ try :
32+ from choreographer import channels
33+ from plotly .utils import PlotlyJSONEncoder
34+
35+ channels .register_custom_encoder (PlotlyJSONEncoder )
36+ _logger .debug ("Successfully registered PlotlyJSONEncoder." )
37+ except ImportError :
38+ _logger .debug ("Couldn't import plotly- skipping." )
3439
3540# Show a warning if the installed Plotly version
3641# is incompatible with this version of Kaleido
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ dependencies = [
3030 " logistro>=1.0.8" ,
3131 " orjson>=3.10.15" ,
3232 " packaging" ,
33- " plotly>=6.3.0" ,
3433 " pytest-timeout>=2.4.0" ,
3534]
3635
You can’t perform that action at this time.
0 commit comments