Repository navigation
Labels
Description
I just tried to update to version 6.0.0 for my project openseries. Using plotly.offline.plot triggers this DeprecationWarning:
DeprecationWarning: *scattermapbox* is deprecated! Use *scattermap* instead. Learn more at: https://plotly.com/python/mapbox-to-maplibre/
However, I am not using a scattermapbox, at least as far as I know. My code is here.
I assume it is related to #4900. Raising issue in case it was not intended.
Below is the output.
venv/lib/python3.10/site-packages/plotly/offline/offline.py:581: in plot
pio.write_html(
venv/lib/python3.10/site-packages/plotly/io/_html.py:479: in write_html
html_str = to_html(
venv/lib/python3.10/site-packages/plotly/io/_html.py:130: in to_html
fig_dict = validate_coerce_fig_to_dict(fig, validate)
venv/lib/python3.10/site-packages/plotly/io/_utils.py:14: in validate_coerce_fig_to_dict
fig_dict = plotly.graph_objs.Figure(fig).to_plotly_json()
venv/lib/python3.10/site-packages/plotly/graph_objs/_figure.py:641: in __init__
super(Figure, self).__init__(data, layout, frames, skip_invalid, **kwargs)
venv/lib/python3.10/site-packages/plotly/basedatatypes.py:556: in __init__
self._layout_obj = self._layout_validator.validate_coerce(
venv/lib/python3.10/site-packages/_plotly_utils/basevalidators.py:2504: in validate_coerce
v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
venv/lib/python3.10/site-packages/plotly/graph_objs/_layout.py:7124: in __init__
self["template"] = _v
venv/lib/python3.10/site-packages/plotly/basedatatypes.py:5898: in __setitem__
super(BaseLayoutHierarchyType, self).__setitem__(prop, value)
venv/lib/python3.10/site-packages/plotly/basedatatypes.py:4852: in __setitem__
self._set_compound_prop(prop, value)
venv/lib/python3.10/site-packages/plotly/basedatatypes.py:5263: in _set_compound_prop
val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
venv/lib/python3.10/site-packages/_plotly_utils/basevalidators.py:2797: in validate_coerce
return super(BaseTemplateValidator, self).validate_coerce(
venv/lib/python3.10/site-packages/_plotly_utils/basevalidators.py:2504: in validate_coerce
v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
venv/lib/python3.10/site-packages/plotly/graph_objs/layout/_template.py:327: in __init__
self["data"] = _v
venv/lib/python3.10/site-packages/plotly/basedatatypes.py:4852: in __setitem__
self._set_compound_prop(prop, value)
venv/lib/python3.10/site-packages/plotly/basedatatypes.py:5263: in _set_compound_prop
val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
venv/lib/python3.10/site-packages/_plotly_utils/basevalidators.py:2504: in validate_coerce
v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
venv/lib/python3.10/site-packages/plotly/graph_objs/layout/template/_data.py:1727: in __init__
self["scattermapbox"] = _v
venv/lib/python3.10/site-packages/plotly/basedatatypes.py:4856: in __setitem__
self._set_array_prop(prop, value)
venv/lib/python3.10/site-packages/plotly/basedatatypes.py:5337: in _set_array_prop
val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
venv/lib/python3.10/site-packages/_plotly_utils/basevalidators.py:2596: in validate_coerce
res.append(self.data_class(v_el, skip_invalid=skip_invalid))
Reacted by Philipp Rudiger, Li Nguyen, Arturo Amor and Kobi Shapira
Activity
mattpotma commentedon Jan 29, 2025
I've got the same error, but it seems to happen only in CI using
pytest.With the following in a file, I can run the file directly without problem, but running
pytest plotly_file.py, I get the deprecation warning.And a
requirements.txtto reproduce itkarrmagadgeteer2 commentedon Jan 30, 2025
Same for me as for @mattpotma. I run
coverage run -m pytest --verbose --capture=nolocally. My dependencies as below when the warning is triggered.Dependencies
Dev dependencies
gvwilson commentedon Feb 3, 2025
Thanks for the bug report and follow-up everyone - I'll see if I can get someone to look into this in our current cycle.
adrinjalali commentedon Feb 4, 2025
We got the same issue here (scikit-learn/scikit-learn#30758). We're using
px.scatter, and it's not clear from the message or the traceback, what we need to change. This seems like an internal usage of the deprecated thing.Our traceback:
KaparaNewbie commentedon Feb 27, 2025
Same here while using
px.histogramin ajupyterlabnotebook.My traceback:
KaparaNewbie commentedon Mar 2, 2025
Another update: this also happens when trying to update the template via
fig.update_layout(template=...).Digging further down, even setting a default template triggers this warning: