Skip to content

Commit 350dd48

Browse files
committed
error message for 'eps' with kaleido v1
1 parent 96bf9a0 commit 350dd48

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

plotly/io/_kaleido.py

+9
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ def to_image(
156156
# Request image bytes
157157
if kaleido_major > 0:
158158
# Kaleido v1
159+
# Check if trying to export to EPS format, which is not supported in Kaleido v1
160+
if format == 'eps':
161+
raise ValueError(
162+
"""
163+
EPS export is not supported with Kaleido v1.
164+
Please downgrade to Kaleido v0 to use EPS export:
165+
$ pip install kaleido==0.2.1
166+
"""
167+
)
159168
img_bytes = kaleido.calc_fig_sync(
160169
fig_dict,
161170
path=None,

0 commit comments

Comments
 (0)