✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

AttributeError: module 'plotly.validators.scattergl.marker.colorbar' has no attribute 'OutlinewidthValidator' (plotly 4.9.0)

I cannot execute any kind of plotting command from plotly.express. I am using the following:

  • Jupyter notebook (NO conda, installed from pip)
  • Plotly 4.9.0 (NO conda, installed from pip)
  • Python 3.7.5, 64-bit (the error also occurs on python 3.8, 64-bit)
  • Windows 10 (the error also occurs on Windows 8 with python 3.8)

The error I obtain is the following:

AttributeError: module 'plotly.validators.scattergl.marker.colorbar' has no attribute 'OutlinewidthValidator'

The full traceback is:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-a6a63159a8ee> in <module>
      1 x = np.random.rand(100)
      2 y = np.random.rand(100)
----> 3 px.scatter(x=x, y=y)

~\AppData\Roaming\Python\Python37\site-packages\plotly\express\_chart_types.py in scatter(data_frame, x, y, color, symbol, size, hover_name, hover_data, custom_data, text, facet_row, facet_col, facet_col_wrap, facet_row_spacing, facet_col_spacing, error_x, error_x_minus, error_y, error_y_minus, animation_frame, animation_group, category_orders, labels, orientation, color_discrete_sequence, color_discrete_map, color_continuous_scale, range_color, color_continuous_midpoint, symbol_sequence, symbol_map, opacity, size_max, marginal_x, marginal_y, trendline, trendline_color_override, log_x, log_y, range_x, range_y, render_mode, title, template, width, height)
     62     mark in 2D space.
     63     """
---> 64     return make_figure(args=locals(), constructor=go.Scatter)
     65 
     66 

~\AppData\Roaming\Python\Python37\site-packages\plotly\express\_core.py in make_figure(args, constructor, trace_patch, layout_patch)
   2056     fig.update_layout(layout_patch)
   2057     if "template" in args and args["template"] is not None:
-> 2058         fig.update_layout(template=args["template"], overwrite=True)
   2059     fig.frames = frame_list if len(frames) > 1 else []
   2060 

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in update_layout(self, dict1, overwrite, **kwargs)
    963             The Figure object that the update_layout method was called on
    964         """
--> 965         self.layout.update(dict1, overwrite=overwrite, **kwargs)
    966         return self
    967 

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in update(self, dict1, overwrite, **kwargs)
   4225             with self.figure.batch_update():
   4226                 BaseFigure._perform_update(self, dict1, overwrite=overwrite)
-> 4227                 BaseFigure._perform_update(self, kwargs, overwrite=overwrite)
   4228         else:
   4229             BaseFigure._perform_update(self, dict1, overwrite=overwrite)

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in _perform_update(plotly_obj, update_obj, overwrite)
   3318                 if overwrite:
   3319                     # Don't recurse and assign property as-is
-> 3320                     plotly_obj[key] = val
   3321                     continue
   3322 

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in __setitem__(self, prop, value)
   4964         if match is None:
   4965             # Set as ordinary property
-> 4966             super(BaseLayoutHierarchyType, self).__setitem__(prop, value)
   4967         else:
   4968             # Set as subplotid property

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in __setitem__(self, prop, value)
   3980                 # ### Handle compound property ###
   3981                 if isinstance(validator, CompoundValidator):
-> 3982                     self._set_compound_prop(prop, value)
   3983 
   3984                 # ### Handle compound array property ###

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in _set_compound_prop(self, prop, val)
   4365         # ------------
   4366         validator = self._get_validator(prop)
-> 4367         val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
   4368 
   4369         # Save deep copies of current and new states

c:\program files\python37\lib\site-packages\_plotly_utils\basevalidators.py in validate_coerce(self, v, skip_invalid)
   2738 
   2739         return super(BaseTemplateValidator, self).validate_coerce(
-> 2740             v, skip_invalid=skip_invalid
   2741         )

c:\program files\python37\lib\site-packages\_plotly_utils\basevalidators.py in validate_coerce(self, v, skip_invalid, _validate)
   2448         elif isinstance(v, self.data_class):
   2449             # Copy object
-> 2450             v = self.data_class(v)
   2451         else:
   2452             if skip_invalid:

~\AppData\Roaming\Python\Python37\site-packages\plotly\graph_objs\layout\_template.py in __init__(self, arg, data, layout, **kwargs)
    317         _v = data if data is not None else _v
    318         if _v is not None:
--> 319             self["data"] = _v
    320         _v = arg.pop("layout", None)
    321         _v = layout if layout is not None else _v

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in __setitem__(self, prop, value)
   3980                 # ### Handle compound property ###
   3981                 if isinstance(validator, CompoundValidator):
-> 3982                     self._set_compound_prop(prop, value)
   3983 
   3984                 # ### Handle compound array property ###

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in _set_compound_prop(self, prop, val)
   4365         # ------------
   4366         validator = self._get_validator(prop)
-> 4367         val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
   4368 
   4369         # Save deep copies of current and new states

c:\program files\python37\lib\site-packages\_plotly_utils\basevalidators.py in validate_coerce(self, v, skip_invalid, _validate)
   2444 
   2445         elif isinstance(v, dict):
-> 2446             v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
   2447 
   2448         elif isinstance(v, self.data_class):

~\AppData\Roaming\Python\Python37\site-packages\plotly\graph_objs\layout\template\_data.py in __init__(self, arg, area, barpolar, bar, box, candlestick, carpet, choroplethmapbox, choropleth, cone, contourcarpet, contour, densitymapbox, funnelarea, funnel, heatmapgl, heatmap, histogram2dcontour, histogram2d, histogram, image, indicator, isosurface, mesh3d, ohlc, parcats, parcoords, pie, pointcloud, sankey, scatter3d, scattercarpet, scattergeo, scattergl, scattermapbox, scatterpolargl, scatterpolar, scatter, scatterternary, splom, streamtube, sunburst, surface, table, treemap, violin, volume, waterfall, **kwargs)
   1659         _v = scattergl if scattergl is not None else _v
   1660         if _v is not None:
-> 1661             self["scattergl"] = _v
   1662         _v = arg.pop("scattermapbox", None)
   1663         _v = scattermapbox if scattermapbox is not None else _v

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in __setitem__(self, prop, value)
   3984                 # ### Handle compound array property ###
   3985                 elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)):
-> 3986                     self._set_array_prop(prop, value)
   3987 
   3988                 # ### Handle simple property ###

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in _set_array_prop(self, prop, val)
   4439         # ------------
   4440         validator = self._get_validator(prop)
-> 4441         val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
   4442 
   4443         # Save deep copies of current and new states

c:\program files\python37\lib\site-packages\_plotly_utils\basevalidators.py in validate_coerce(self, v, skip_invalid)
   2536                     res.append(self.data_class(v_el))
   2537                 elif isinstance(v_el, dict):
-> 2538                     res.append(self.data_class(v_el, skip_invalid=skip_invalid))
   2539                 else:
   2540                     if skip_invalid:

~\AppData\Roaming\Python\Python37\site-packages\plotly\graph_objs\_scattergl.py in __init__(self, arg, connectgaps, customdata, customdatasrc, dx, dy, error_x, error_y, fill, fillcolor, hoverinfo, hoverinfosrc, hoverlabel, hovertemplate, hovertemplatesrc, hovertext, hovertextsrc, ids, idssrc, legendgroup, line, marker, meta, metasrc, mode, name, opacity, selected, selectedpoints, showlegend, stream, text, textfont, textposition, textpositionsrc, textsrc, texttemplate, texttemplatesrc, uid, uirevision, unselected, visible, x, x0, xaxis, xcalendar, xsrc, y, y0, yaxis, ycalendar, ysrc, **kwargs)
   2350         _v = marker if marker is not None else _v
   2351         if _v is not None:
-> 2352             self["marker"] = _v
   2353         _v = arg.pop("meta", None)
   2354         _v = meta if meta is not None else _v

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in __setitem__(self, prop, value)
   3980                 # ### Handle compound property ###
   3981                 if isinstance(validator, CompoundValidator):
-> 3982                     self._set_compound_prop(prop, value)
   3983 
   3984                 # ### Handle compound array property ###

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in _set_compound_prop(self, prop, val)
   4365         # ------------
   4366         validator = self._get_validator(prop)
-> 4367         val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
   4368 
   4369         # Save deep copies of current and new states

c:\program files\python37\lib\site-packages\_plotly_utils\basevalidators.py in validate_coerce(self, v, skip_invalid, _validate)
   2444 
   2445         elif isinstance(v, dict):
-> 2446             v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
   2447 
   2448         elif isinstance(v, self.data_class):

~\AppData\Roaming\Python\Python37\site-packages\plotly\graph_objs\scattergl\_marker.py in __init__(self, arg, autocolorscale, cauto, cmax, cmid, cmin, color, coloraxis, colorbar, colorscale, colorsrc, line, opacity, opacitysrc, reversescale, showscale, size, sizemin, sizemode, sizeref, sizesrc, symbol, symbolsrc, **kwargs)
   1297         _v = colorbar if colorbar is not None else _v
   1298         if _v is not None:
-> 1299             self["colorbar"] = _v
   1300         _v = arg.pop("colorscale", None)
   1301         _v = colorscale if colorscale is not None else _v

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in __setitem__(self, prop, value)
   3980                 # ### Handle compound property ###
   3981                 if isinstance(validator, CompoundValidator):
-> 3982                     self._set_compound_prop(prop, value)
   3983 
   3984                 # ### Handle compound array property ###

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in _set_compound_prop(self, prop, val)
   4365         # ------------
   4366         validator = self._get_validator(prop)
-> 4367         val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
   4368 
   4369         # Save deep copies of current and new states

c:\program files\python37\lib\site-packages\_plotly_utils\basevalidators.py in validate_coerce(self, v, skip_invalid, _validate)
   2444 
   2445         elif isinstance(v, dict):
-> 2446             v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
   2447 
   2448         elif isinstance(v, self.data_class):

~\AppData\Roaming\Python\Python37\site-packages\plotly\graph_objs\scattergl\marker\_colorbar.py in __init__(self, arg, bgcolor, bordercolor, borderwidth, dtick, exponentformat, len, lenmode, nticks, outlinecolor, outlinewidth, separatethousands, showexponent, showticklabels, showtickprefix, showticksuffix, thickness, thicknessmode, tick0, tickangle, tickcolor, tickfont, tickformat, tickformatstops, tickformatstopdefaults, ticklen, tickmode, tickprefix, ticks, ticksuffix, ticktext, ticktextsrc, tickvals, tickvalssrc, tickwidth, title, titlefont, titleside, x, xanchor, xpad, y, yanchor, ypad, **kwargs)
   1802         _v = outlinewidth if outlinewidth is not None else _v
   1803         if _v is not None:
-> 1804             self["outlinewidth"] = _v
   1805         _v = arg.pop("separatethousands", None)
   1806         _v = separatethousands if separatethousands is not None else _v

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in __setitem__(self, prop, value)
   3976 
   3977                 # ### Get validator for this property ###
-> 3978                 validator = self._get_validator(prop)
   3979 
   3980                 # ### Handle compound property ###

~\AppData\Roaming\Python\Python37\site-packages\plotly\basedatatypes.py in _get_validator(self, prop)
   3467         from .validator_cache import ValidatorCache
   3468 
-> 3469         return ValidatorCache.get_validator(self._path_str, prop)
   3470 
   3471     @property

~\AppData\Roaming\Python\Python37\site-packages\plotly\validator_cache.py in get_validator(parent_path, prop_name)
     28                 validator = getattr(
     29                     importlib.import_module("plotly.validators." + parent_path),
---> 30                     class_name,
     31                 )(plotly_name=prop_name)
     32             ValidatorCache._cache[key] = validator

AttributeError: module 'plotly.validators.scattergl.marker.colorbar' has no attribute 'OutlinewidthValidator'

The output of my pip list is:

absl-py              0.8.1
astor                0.8.0
attrs                19.3.0
audioread            2.1.8
backcall             0.1.0
bleach               3.1.0
blis                 0.4.1
cachetools           3.1.1
catalogue            1.0.0
certifi              2019.9.11
cffi                 1.13.2
chardet              3.0.4
colorama             0.4.1
cycler               0.10.0
cymem                2.0.3
decorator            4.4.1
defusedxml           0.6.0
entrypoints          0.3
future               0.18.2
gast                 0.2.2
google-auth          1.7.1
google-auth-oauthlib 0.4.1
google-pasta         0.1.8
grpcio               1.25.0
h5py                 2.10.0
idna                 2.8
importlib-metadata   0.23
ipykernel            5.1.3
ipython              7.9.0
ipython-genutils     0.2.0
ipywidgets           7.5.1
it-core-news-sm      2.2.5
jedi                 0.15.1
Jinja2               2.10.3
joblib               0.14.0
jsonschema           3.1.1
jupyter              1.0.0
jupyter-client       5.3.4
jupyter-console      6.0.0
jupyter-core         4.6.1
Keras-Applications   1.0.8
Keras-Preprocessing  1.1.0
kiwisolver           1.1.0
lesscpy              0.13.0
librosa              0.7.1
llvmlite             0.30.0
logmmse              1.4
Markdown             3.1.1
MarkupSafe           1.1.1
matplotlib           3.1.1
mistune              0.8.4
mlxtend              0.17.0
more-itertools       7.2.0
murmurhash           1.0.2
mutagen              1.43.0
nbconvert            5.6.1
nbformat             4.4.0
nltk                 3.4.5
noisereduce          1.0.1
notebook             6.0.2
numba                0.46.0
numpy                1.17.3
oauthlib             3.1.0
opt-einsum           3.1.0
pandas               0.25.3
pandocfilters        1.4.2
parso                0.5.1
pickleshare          0.7.5
Pillow               6.2.1
pip                  20.2.2
plac                 1.1.3
plotly               4.9.0
ply                  3.11
preshed              3.0.2
prometheus-client    0.7.1
prompt-toolkit       2.0.10
protobuf             3.10.0
pyasn1               0.4.8
pyasn1-modules       0.2.7
pycparser            2.19
pycryptodome         3.9.7
pydub                0.23.1
Pygments             2.4.2
pynormalize          0.1.4
pyparsing            2.4.4
PyQt5                5.13.2
PyQt5-sip            12.7.0
pyrsistent           0.15.5
python-dateutil      2.8.1
pytz                 2019.3
pywin32              225
pywinpty             0.5.5
pyzmq                18.1.0
qtconsole            4.5.5
requests             2.22.0
requests-oauthlib    1.3.0
resampy              0.2.2
retrying             1.3.3
rsa                  4.0
scikit-learn         0.21.3
scipy                1.3.1
seaborn              0.9.0
Send2Trash           1.5.0
setuptools           41.2.0
six                  1.13.0
SoundFile            0.10.2
spacy-lookups-data   0.2.0
srsly                1.0.1
tensorboard          2.0.1
tensorflow           2.0.0
tensorflow-estimator 2.0.1
termcolor            1.1.0
terminado            0.8.2
testpath             0.4.4
thinc                7.3.1
torch                1.5.1
torchvision          0.6.1
tornado              6.0.3
tqdm                 4.39.0
traitlets            4.3.3
urllib3              1.25.6
wasabi               0.6.0
wcwidth              0.1.7
webencodings         0.5.1
Werkzeug             0.16.0
wheel                0.33.6
widgetsnbextension   3.5.1
wordcloud            1.5.0
wrapt                1.11.2
zipp                 0.6.0

A screenshot demonstrating the problem:

Thank you in advance for any help.

I am sorry to insist, but please, I need help.

Is there any mod that could at least reply out of courtesy? I would like to solve this issue, please.

Really? Nobody has even the slightest idea?

Well, i guess i’m not using your library then.