-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
v6.1.0 breaks fig.write_image() #5187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I see this problem too (it broke CI tests). I am not familiar with the source code but superficially, it works if one removes one level of indentation for |
regression test import plotly.graph_objects as go
import numpy as np
def test_write_image(tmp_path):
np.random.seed(1)
N = 100
x = np.random.rand(N)
y = np.random.rand(N)
fig = go.Figure()
fig.add_trace(go.Scatter(
x=x,
y=y,
mode="markers",
))
fig.write_image(tmp_path / "fig1.png")
assert (tmp_path /"fig1.png").exists()
Version tested
Also note that kaleido extra dependency Line 49 in 1462f3f
will only work if the use ask for Without this, pip install effectively falls back to 6.0.1. $ pip install 'plotly[kaleido]'
Resolved 3 packages in 6ms
Installed 3 packages in 291ms
+ narwhals==1.39.1
+ packaging==25.0
+ plotly==6.0.1
warning: The package `plotly==6.0.1` does not have an extra named `kaleido`
|
Hi, it seems that setting the
ENABLE_KALEIDO_V0_DEPRECATION_WARNINGS = False
broke thewrite_image()
method.plotly.py/plotly/basedatatypes.py
Lines 3898 to 3912 in 1462f3f
https://github.com/plotly/plotly.py/pull/5177/files#diff-e30d1d28e90c51821f0eeed0db68656f4317c0754deaec93c3365b8a93b4caefR14
The text was updated successfully, but these errors were encountered: