You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ValueError:
Invalid value of type 'builtins.str' received for the 'dash' property of layout.shape.line
Received value: '5px,3px,3px,2px'
The 'dash' property is a string and must be specified as:
- One of the following strings:
['solid', 'dot', 'dash', 'longdash', 'dashdot',
'longdashdot']
- A number that will be converted to a string
Moreover, the documentation and the Line docstring state that it should be allowed, but the layout.shape.Line.dash property docstring states otherwise.
The text was updated successfully, but these errors were encountered:
Had the same issue. After looking around a bit, I found that the problem is that the DashValidator from validators/layout/shape/line inherits from StringValidator instead of DashValidator (same actually for validators/scattersmith/line and validators/layout/newshape/line). Changing this line:
class DashValidator(_plotly_utils.basevalidators.StringValidator):
to this:
class DashValidator(_plotly_utils.basevalidators.DashValidator):
in the file C:\Users\[USER]\Anaconda3\Lib\site-packages\plotly\validators\layout\shape\line\_dash.py on Windows (probably similar on Linux/Mac) fixes the issue. Not sure how to make a patch of this though.
dvd7587
added a commit
to dvd7587/plotly.py
that referenced
this issue
Mar 1, 2022
Example:
plotly.graph_objects.layout.shape.Line(color='black', width=2, dash='5px,3px,3px,2px')
produces the following:
Moreover, the documentation and the Line docstring state that it should be allowed, but the
layout.shape.Line.dash
property docstring states otherwise.The text was updated successfully, but these errors were encountered: