-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
When running notebooks with plotly[kaleido]==6.2.0
there are instances when deprecation warnings are emitted given the same parameterization of a plot function. I had hoped to include a very sensible reproduction case for this issue, but unfortunately it's so much stranger than that.
The issue only appears to happen when instantiating a class from another library I am working with. This library is opening a handle to some binaries on my system, which is my only idea as to why there would be any difference from Jupyter or plotly's perspective. I've attached a notebook with a requirements file, but I'll go over the issue here as well.
In short,
import os
os.environ["PLOTLY_RENDERER"] = "svg"
import pmlb
import plotly.express as px
from howso.engine import Trainee
df = pmlb.fetch_data("iris")
t = Trainee()
fig = px.scatter(df, x="sepal-width", y="sepal-length", color="target")
fig.show()
produces the following warning:
file:///C:/Users/JacobBeel/workspace/plotly.py/plotly/io/_base_renderers.py:123: DeprecationWarning:
Support for the 'engine' argument is deprecated and will be removed after September 2025.
Kaleido will be the only supported engine at that time.
Whereas
import os
os.environ["PLOTLY_RENDERER"] = "svg"
import pmlb
import plotly.express as px
from howso.engine import Trainee
df = pmlb.fetch_data("iris")
fig = px.scatter(df, x="sepal-width", y="sepal-length", color="target")
fig.show()
does not. Note that all I've done is not instantiate the Trainee
class.
I have managed a fix which I'm going to PR, but it doesn't really address the strangeness of the reproduction.