Skip to content

DeprecationWarning scattermapbox unrelated trigger #4997

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

Closed
karrmagadgeteer2 opened this issue Jan 29, 2025 · 6 comments · Fixed by #5080 or #5086
Closed

DeprecationWarning scattermapbox unrelated trigger #4997

karrmagadgeteer2 opened this issue Jan 29, 2025 · 6 comments · Fixed by #5080 or #5086
Assignees
Labels
bug something broken P1 needed for current cycle

Comments

@karrmagadgeteer2
Copy link

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))
@mattpotma
Copy link

mattpotma commented 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.

import plotly.express as px

def test_figure():
    _ = px.bar(x=["A", "B", "C"], y=[5, 10, 15])


if __name__ == "__main__":
    test_figure()

And a requirements.txt to reproduce it

iniconfig==2.0.0
narwhals==1.24.1
numpy==2.2.2
packaging==24.2
pandas==2.2.3
plotly==6.0.0
pluggy==1.5.0
pytest==8.3.4
python-dateutil==2.9.0.post0
pytz==2024.2
six==1.17.0
tzdata==2025.1

@karrmagadgeteer2
Copy link
Author

karrmagadgeteer2 commented Jan 30, 2025

Same for me as for @mattpotma. I run coverage run -m pytest --verbose --capture=no locally. My dependencies as below when the warning is triggered.

Dependencies

holidays              0.65
numpy                 2.2.2 
openpyxl              3.1.5 
pandas                2.2.3 
plotly                6.0.0
pyarrow               19.0.0
pydantic              2.10.6
python-dateutil       2.9.0.post0
requests              2.32.3
scipy                 1.15.1
statsmodels           0.14.4

Dev dependencies

black                 25.1.0
coverage              7.6.10
genbadge              1.1.1 
mypy                  1.14.1
pandas-stubs          2.2.3.241126
pre-commit            4.1.0 
pytest                8.3.4
ruff                  0.9.3
types-openpyxl        3.1.5.20241225
types-python-dateutil 2.9.0.20241206
types-requests        2.32.0.20241016

@gvwilson gvwilson added bug something broken P1 needed for current cycle labels Feb 3, 2025
@gvwilson
Copy link
Contributor

gvwilson commented 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
Copy link

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:

    Traceback (most recent call last):
      File "/home/circleci/project/examples/model_selection/plot_grid_search_text_feature_extraction.py", line 176, in <module>
        fig = px.scatter(
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/express/_chart_types.py", line 69, in scatter
        return make_figure(args=locals(), constructor=go.Scatter)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/express/_core.py", line 2756, in make_figure
        fig.update_layout(template=args["template"], overwrite=True)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/graph_objs/_figure.py", line 787, in update_layout
        return super(Figure, self).update_layout(dict1, overwrite, **kwargs)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/basedatatypes.py", line 1392, in update_layout
        self.layout.update(dict1, overwrite=overwrite, **kwargs)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/basedatatypes.py", line 5123, in update
        BaseFigure._perform_update(self, kwargs, overwrite=overwrite)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/basedatatypes.py", line 3896, in _perform_update
        plotly_obj[key] = val
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/basedatatypes.py", line 5898, in __setitem__
        super(BaseLayoutHierarchyType, self).__setitem__(prop, value)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/basedatatypes.py", line 4852, in __setitem__
        self._set_compound_prop(prop, value)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/basedatatypes.py", line 5263, in _set_compound_prop
        val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/_plotly_utils/basevalidators.py", line 2797, in validate_coerce
        return super(BaseTemplateValidator, self).validate_coerce(
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/_plotly_utils/basevalidators.py", line 2508, in validate_coerce
        v = self.data_class(v)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/graph_objs/layout/_template.py", line 327, in __init__
        self["data"] = _v
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/basedatatypes.py", line 4852, in __setitem__
        self._set_compound_prop(prop, value)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/basedatatypes.py", line 5263, in _set_compound_prop
        val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/_plotly_utils/basevalidators.py", line 2504, in validate_coerce
        v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/graph_objs/layout/template/_data.py", line 1727, in __init__
        self["scattermapbox"] = _v
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/basedatatypes.py", line 4856, in __setitem__
        self._set_array_prop(prop, value)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/basedatatypes.py", line 5337, in _set_array_prop
        val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/_plotly_utils/basevalidators.py", line 2596, in validate_coerce
        res.append(self.data_class(v_el, skip_invalid=skip_invalid))
      File "/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/plotly/graph_objs/_scattermapbox.py", line 2297, in __init__
        warn(
    DeprecationWarning: *scattermapbox* is deprecated! Use *scattermap* instead. Learn more at: https://plotly.com/python/mapbox-to-maplibre/

@KaparaNewbie
Copy link

KaparaNewbie commented Feb 27, 2025

Same here while using px.histogram in a jupyterlab notebook.

My traceback:

---------------------------------------------------------------------------
DeprecationWarning                        Traceback (most recent call last)
Cell In[1312], line 1
----> 1 fig = px.histogram(
      2     per_sample_per_cb_copies_df,
      3     x="Copies/UniqueIsoforms",
      4     color="Sample",
      5     # facet_col="Sample",
      6     # color_discrete_map=color_discrete_map,
      7     # labels={"NumOfUniqueGenes": "Unique genes per cell"},
      8     histnorm="percent",
      9     # cumulative=True,
     10     # log_x=True,
     11     # log_y=True
     12 )
     13 fig.update_traces(opacity=0.75)
     14 fig.update_yaxes(title="Reads / unique isoforms")

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/express/_chart_types.py:490](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/express/_chart_types.py#line=489), in histogram(data_frame, x, y, color, pattern_shape, facet_row, facet_col, facet_col_wrap, facet_row_spacing, facet_col_spacing, hover_name, hover_data, animation_frame, animation_group, category_orders, labels, color_discrete_sequence, color_discrete_map, pattern_shape_sequence, pattern_shape_map, marginal, opacity, orientation, barmode, barnorm, histnorm, log_x, log_y, range_x, range_y, histfunc, cumulative, nbins, text_auto, title, subtitle, template, width, height)
    443 def histogram(
    444     data_frame=None,
    445     x=None,
   (...)
    482     height=None,
    483 ) -> go.Figure:
    484     """
    485     In a histogram, rows of `data_frame` are grouped together into a
    486     rectangular mark to visualize the 1D distribution of an aggregate
    487     function `histfunc` (e.g. the count or sum) of the value `y` (or `x` if
    488     `orientation` is `'h'`).
    489     """
--> 490     return make_figure(
    491         args=locals(),
    492         constructor=go.Histogram,
    493         trace_patch=dict(
    494             histnorm=histnorm,
    495             histfunc=histfunc,
    496             cumulative=dict(enabled=cumulative),
    497         ),
    498         layout_patch=dict(barmode=barmode, barnorm=barnorm),
    499     )

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/express/_core.py:2756](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/express/_core.py#line=2755), in make_figure(args, constructor, trace_patch, layout_patch)
   2754 fig.update_layout(layout_patch)
   2755 if "template" in args and args["template"] is not None:
-> 2756     fig.update_layout(template=args["template"], overwrite=True)
   2757 for f in frame_list:
   2758     f["name"] = str(f["name"])

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/graph_objs/_figure.py:787](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/graph_objs/_figure.py#line=786), in Figure.update_layout(self, dict1, overwrite, **kwargs)
    761 def update_layout(self, dict1=None, overwrite=False, **kwargs) -> "Figure":
    762     """
    763 
    764     Update the properties of the figure's layout with a dict and/or with
   (...)
    785 
    786     """
--> 787     return super(Figure, self).update_layout(dict1, overwrite, **kwargs)

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py:1392](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py#line=1391), in BaseFigure.update_layout(self, dict1, overwrite, **kwargs)
   1368 def update_layout(self, dict1=None, overwrite=False, **kwargs):
   1369     """
   1370     Update the properties of the figure's layout with a dict and/or with
   1371     keyword arguments.
   (...)
   1390         The Figure object that the update_layout method was called on
   1391     """
-> 1392     self.layout.update(dict1, overwrite=overwrite, **kwargs)
   1393     return self

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py:5123](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py#line=5122), in BasePlotlyType.update(self, dict1, overwrite, **kwargs)
   5121     with self.figure.batch_update():
   5122         BaseFigure._perform_update(self, dict1, overwrite=overwrite)
-> 5123         BaseFigure._perform_update(self, kwargs, overwrite=overwrite)
   5124 else:
   5125     BaseFigure._perform_update(self, dict1, overwrite=overwrite)

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py:3896](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py#line=3895), in BaseFigure._perform_update(plotly_obj, update_obj, overwrite)
   3892 val = update_obj[key]
   3894 if overwrite:
   3895     # Don't recurse and assign property as-is
-> 3896     plotly_obj[key] = val
   3897     continue
   3899 validator = plotly_obj._get_prop_validator(key)

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py:5898](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py#line=5897), in BaseLayoutType.__setitem__(self, prop, value)
   5895 match = self._subplot_re_match(prop)
   5896 if match is None:
   5897     # Set as ordinary property
-> 5898     super(BaseLayoutHierarchyType, self).__setitem__(prop, value)
   5899 else:
   5900     # Set as subplotid property
   5901     self._set_subplotid_prop(prop, value)

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py:4852](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py#line=4851), in BasePlotlyType.__setitem__(self, prop, value)
   4850 # ### Handle compound property ###
   4851 if isinstance(validator, CompoundValidator):
-> 4852     self._set_compound_prop(prop, value)
   4854 # ### Handle compound array property ###
   4855 elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)):

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py:5263](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py#line=5262), in BasePlotlyType._set_compound_prop(self, prop, val)
   5260 # Import value
   5261 # ------------
   5262 validator = self._get_validator(prop)
-> 5263 val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
   5265 # Save deep copies of current and new states
   5266 # ------------------------------------------
   5267 curr_val = self._compound_props.get(prop, None)

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/_plotly_utils/basevalidators.py:2797](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/_plotly_utils/basevalidators.py#line=2796), in BaseTemplateValidator.validate_coerce(self, v, skip_invalid)
   2791 if v == {} or isinstance(v, self.data_class) and v.to_plotly_json() == {}:
   2792     # Replace empty template with {'data': {'scatter': [{}]}} so that we can
   2793     # tell the difference between an un-initialized template and a template
   2794     # explicitly set to empty.
   2795     return self.data_class(data_scatter=[{}])
-> 2797 return super(BaseTemplateValidator, self).validate_coerce(
   2798     v, skip_invalid=skip_invalid
   2799 )

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/_plotly_utils/basevalidators.py:2508](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/_plotly_utils/basevalidators.py#line=2507), in CompoundValidator.validate_coerce(self, v, skip_invalid, _validate)
   2504     v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
   2506 elif isinstance(v, self.data_class):
   2507     # Copy object
-> 2508     v = self.data_class(v)
   2509 else:
   2510     if skip_invalid:

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/graph_objs/layout/_template.py:327](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/graph_objs/layout/_template.py#line=326), in Template.__init__(self, arg, data, layout, **kwargs)
    325 _v = data if data is not None else _v
    326 if _v is not None:
--> 327     self["data"] = _v
    328 _v = arg.pop("layout", None)
    329 _v = layout if layout is not None else _v

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py:4852](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py#line=4851), in BasePlotlyType.__setitem__(self, prop, value)
   4850 # ### Handle compound property ###
   4851 if isinstance(validator, CompoundValidator):
-> 4852     self._set_compound_prop(prop, value)
   4854 # ### Handle compound array property ###
   4855 elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)):

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py:5263](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py#line=5262), in BasePlotlyType._set_compound_prop(self, prop, val)
   5260 # Import value
   5261 # ------------
   5262 validator = self._get_validator(prop)
-> 5263 val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
   5265 # Save deep copies of current and new states
   5266 # ------------------------------------------
   5267 curr_val = self._compound_props.get(prop, None)

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/_plotly_utils/basevalidators.py:2504](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/_plotly_utils/basevalidators.py#line=2503), in CompoundValidator.validate_coerce(self, v, skip_invalid, _validate)
   2501     v = self.data_class()
   2503 elif isinstance(v, dict):
-> 2504     v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
   2506 elif isinstance(v, self.data_class):
   2507     # Copy object
   2508     v = self.data_class(v)

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/graph_objs/layout/template/_data.py:1727](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/graph_objs/layout/template/_data.py#line=1726), in Data.__init__(self, arg, barpolar, bar, box, candlestick, carpet, choroplethmapbox, choroplethmap, choropleth, cone, contourcarpet, contour, densitymapbox, densitymap, funnelarea, funnel, heatmap, histogram2dcontour, histogram2d, histogram, icicle, image, indicator, isosurface, mesh3d, ohlc, parcats, parcoords, pie, sankey, scatter3d, scattercarpet, scattergeo, scattergl, scattermapbox, scattermap, scatterpolargl, scatterpolar, scatter, scattersmith, scatterternary, splom, streamtube, sunburst, surface, table, treemap, violin, volume, waterfall, **kwargs)
   1725 _v = scattermapbox if scattermapbox is not None else _v
   1726 if _v is not None:
-> 1727     self["scattermapbox"] = _v
   1728 _v = arg.pop("scattermap", None)
   1729 _v = scattermap if scattermap is not None else _v

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py:4856](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py#line=4855), in BasePlotlyType.__setitem__(self, prop, value)
   4854 # ### Handle compound array property ###
   4855 elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)):
-> 4856     self._set_array_prop(prop, value)
   4858 # ### Handle simple property ###
   4859 else:
   4860     self._set_prop(prop, value)

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py:5337](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/basedatatypes.py#line=5336), in BasePlotlyType._set_array_prop(self, prop, val)
   5334 # Import value
   5335 # ------------
   5336 validator = self._get_validator(prop)
-> 5337 val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
   5339 # Save deep copies of current and new states
   5340 # ------------------------------------------
   5341 curr_val = self._compound_array_props.get(prop, None)

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/_plotly_utils/basevalidators.py:2596](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/_plotly_utils/basevalidators.py#line=2595), in CompoundArrayValidator.validate_coerce(self, v, skip_invalid)
   2594     res.append(self.data_class(v_el))
   2595 elif isinstance(v_el, dict):
-> 2596     res.append(self.data_class(v_el, skip_invalid=skip_invalid))
   2597 else:
   2598     if skip_invalid:

File [~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/graph_objs/_scattermapbox.py:2297](http://localhost:5678/doc/tree/Code/Notebooks/~/anaconda3/envs/combinatorics2/lib/python3.12/site-packages/plotly/graph_objs/_scattermapbox.py#line=2296), in Scattermapbox.__init__(self, arg, below, cluster, connectgaps, customdata, customdatasrc, fill, fillcolor, hoverinfo, hoverinfosrc, hoverlabel, hovertemplate, hovertemplatesrc, hovertext, hovertextsrc, ids, idssrc, lat, latsrc, legend, legendgroup, legendgrouptitle, legendrank, legendwidth, line, lon, lonsrc, marker, meta, metasrc, mode, name, opacity, selected, selectedpoints, showlegend, stream, subplot, text, textfont, textposition, textsrc, texttemplate, texttemplatesrc, uid, uirevision, unselected, visible, **kwargs)
   2293 # Reset skip_invalid
   2294 # ------------------
   2295 self._skip_invalid = False
-> 2297 warn(
   2298     "*scattermapbox* is deprecated!"
   2299     + " Use *scattermap* instead."
   2300     + " Learn more at: https://plotly.com/python/mapbox-to-maplibre/",
   2301     stacklevel=2,
   2302     category=DeprecationWarning,
   2303 )

DeprecationWarning: *scattermapbox* is deprecated! Use *scattermap* instead. Learn more at: https://plotly.com/python/mapbox-to-maplibre/

@KaparaNewbie
Copy link

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:

import plotly.io as pio
pio.templates.default = "plotly_white"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P1 needed for current cycle
Projects
None yet
6 participants