Skip to content

build-doc failing with AttributeError: module 'plotly.validators.layout.hoverlabel' has no attribute 'GrouptitlefontValidator' #4820

Closed
@LiamConnors

Description

@LiamConnors

build-doc is failing with AttributeError: module 'plotly.validators.layout.hoverlabel' has no attribute 'GrouptitlefontValidator'

~/Desktop/plotly.py/packages/python/plotly/plotly/io/_kaleido.py:338: UserWarning:

full_figure_for_development is not recommended or necessary for production use in most circumstances. 
To suppress this warning, set warn=False

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[10], line 1
----> 1 full_fig = fig.full_figure_for_development()
      2 print(full_fig)

File ~/Desktop/plotly.py/packages/python/plotly/plotly/basedatatypes.py:3476, in BaseFigure.full_figure_for_development(self, warn, as_dict)
   3450 """
   3451 Compute default values for all attributes not specified in the input figure and
   3452 returns the output as a "full" figure. This function calls Plotly.js via Kaleido
   (...)
   3472     The full figure
   3473 """
   3474 import plotly.io as pio
-> 3476 return pio.full_figure_for_development(self, warn, as_dict)

File ~/Desktop/plotly.py/packages/python/plotly/plotly/io/_kaleido.py:350, in full_figure_for_development(fig, warn, as_dict)
    347 else:
    348     import plotly.graph_objects as go
--> 350     return go.Figure(fig, skip_invalid=True)

File ~/Desktop/plotly.py/packages/python/plotly/plotly/graph_objs/_figure.py:641, in Figure.__init__(self, data, layout, frames, skip_invalid, **kwargs)
      5 def __init__(
      6     self, data=None, layout=None, frames=None, skip_invalid=False, **kwargs
      7 ):
      8     """
      9     Create a new :class:Figure instance
     10 
   (...)
    639         is invalid AND skip_invalid is False
    640     """
--> 641     super(Figure, self).__init__(data, layout, frames, skip_invalid, **kwargs)

File ~/Desktop/plotly.py/packages/python/plotly/plotly/basedatatypes.py:556, in BaseFigure.__init__(self, data, layout_plotly, frames, skip_invalid, **kwargs)
    553 self._layout_validator = LayoutValidator()
    555 # ### Import Layout ###
--> 556 self._layout_obj = self._layout_validator.validate_coerce(
    557     layout, skip_invalid=skip_invalid, _validate=self._validate
    558 )
    560 # ### Import clone of layout properties ###
    561 self._layout = deepcopy(self._layout_obj._props)

File ~/Desktop/plotly.py/packages/python/plotly/_plotly_utils/basevalidators.py:2512, in CompoundValidator.validate_coerce(self, v, skip_invalid, _validate)
   2509     v = self.data_class()
   2511 elif isinstance(v, dict):
-> 2512     v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
   2514 elif isinstance(v, self.data_class):
   2515     # Copy object
   2516     v = self.data_class(v)

File ~/Desktop/plotly.py/packages/python/plotly/plotly/graph_objs/_layout.py:6976, in Layout.__init__(self, arg, activeselection, activeshape, annotations, annotationdefaults, autosize, autotypenumbers, barcornerradius, bargap, bargroupgap, barmode, barnorm, boxgap, boxgroupgap, boxmode, calendar, clickmode, coloraxis, colorscale, colorway, computed, datarevision, dragmode, editrevision, extendfunnelareacolors, extendiciclecolors, extendpiecolors, extendsunburstcolors, extendtreemapcolors, font, funnelareacolorway, funnelgap, funnelgroupgap, funnelmode, geo, grid, height, hiddenlabels, hiddenlabelssrc, hidesources, hoverdistance, hoverlabel, hovermode, hoversubplots, iciclecolorway, images, imagedefaults, legend, map, mapbox, margin, meta, metasrc, minreducedheight, minreducedwidth, modebar, newselection, newshape, paper_bgcolor, piecolorway, plot_bgcolor, polar, scattergap, scattermode, scene, selectdirection, selectionrevision, selections, selectiondefaults, separators, shapes, shapedefaults, showlegend, sliders, sliderdefaults, smith, spikedistance, sunburstcolorway, template, ternary, title, transition, treemapcolorway, uirevision, uniformtext, updatemenus, updatemenudefaults, violingap, violingroupgap, violinmode, waterfallgap, waterfallgroupgap, waterfallmode, width, xaxis, yaxis, **kwargs)
   6974 _v = hoverlabel if hoverlabel is not None else _v
   6975 if _v is not None:
-> 6976     self["hoverlabel"] = _v
   6977 _v = arg.pop("hovermode", None)
   6978 _v = hovermode if hovermode is not None else _v

File ~/Desktop/plotly.py/packages/python/plotly/plotly/basedatatypes.py:5898, 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 ~/Desktop/plotly.py/packages/python/plotly/plotly/basedatatypes.py:4852, 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 ~/Desktop/plotly.py/packages/python/plotly/plotly/basedatatypes.py:5263, 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 ~/Desktop/plotly.py/packages/python/plotly/_plotly_utils/basevalidators.py:2512, in CompoundValidator.validate_coerce(self, v, skip_invalid, _validate)
   2509     v = self.data_class()
   2511 elif isinstance(v, dict):
-> 2512     v = self.data_class(v, skip_invalid=skip_invalid, _validate=_validate)
   2514 elif isinstance(v, self.data_class):
   2515     # Copy object
   2516     v = self.data_class(v)

File ~/Desktop/plotly.py/packages/python/plotly/plotly/graph_objs/layout/_hoverlabel.py:451, in Hoverlabel.__init__(self, arg, align, bgcolor, bordercolor, font, grouptitlefont, namelength, **kwargs)
    449 _v = grouptitlefont if grouptitlefont is not None else _v
    450 if _v is not None:
--> 451     self["grouptitlefont"] = _v
    452 _v = arg.pop("namelength", None)
    453 _v = namelength if namelength is not None else _v

File ~/Desktop/plotly.py/packages/python/plotly/plotly/basedatatypes.py:4848, in BasePlotlyType.__setitem__(self, prop, value)
   4845     self._raise_on_invalid_property_error()(prop)
   4847 # ### Get validator for this property ###
-> 4848 validator = self._get_validator(prop)
   4850 # ### Handle compound property ###
   4851 if isinstance(validator, CompoundValidator):

File ~/Desktop/plotly.py/packages/python/plotly/plotly/basedatatypes.py:4330, in BasePlotlyType._get_validator(self, prop)
   4327 def _get_validator(self, prop):
   4328     from .validator_cache import ValidatorCache
-> 4330     return ValidatorCache.get_validator(self._path_str, prop)

File ~/Desktop/plotly.py/packages/python/plotly/plotly/validator_cache.py:28, in ValidatorCache.get_validator(parent_path, prop_name)
     26         lookup_name = lookup_name or prop_name
     27         class_name = lookup_name.title() + "Validator"
---> 28         validator = getattr(
     29             importlib.import_module("plotly.validators." + parent_path),
     30             class_name,
     31         )(plotly_name=prop_name)
     32     ValidatorCache._cache[key] = validator
     34 return ValidatorCache._cache[key]

File ~/Desktop/plotly.py/packages/python/plotly/_plotly_utils/importers.py:39, in relative_import.<locals>.__getattr__(import_name)
     36     class_module = importlib.import_module(rel_module, parent_name)
     37     return getattr(class_module, class_name)
---> 39 raise AttributeError(
     40     "module {__name__!r} has no attribute {name!r}".format(
     41         name=import_name, __name__=parent_name
     42     )
     43 )

AttributeError: module 'plotly.validators.layout.hoverlabel' has no attribute 'GrouptitlefontValidator'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions