Open matt-sd-watson opened 9 months ago
Pinging here to see if there were any updates on this. I am continung to receive this error and it prevents certain callbacks from firing properly, such as when I want to export the current canvas from dcc.Graph
as HTML. For example, with the following shapes contained in my go.Figure
:
print(fig['layout'['shapes'])
[{'editable': True, 'fillcolor': 'rgba(0, 0, 0, 0)', 'fillrule': 'evenodd', 'label': {'text': ''}, 'layer': 'above', 'line': {'color': 'white', 'dash': 'solid', 'width': 4}, 'opacity': 1, 'path': 'M243.25,230.44512195121953L288.9817073170732,158.18902439024393L299.9573170731707,141.72560975609758L302.7012195121951,130.75000000000003L299.0426829268293,117.03048780487805L287.1524390243903,101.48170731707317L271.6036585365854,94.16463414634147L250.5670731707317,92.33536585365854L181.96951219512198,106.0548780487805L167.33536585365857,103.3109756097561L128.9207317073171,80.44512195121952L117.03048780487805,77.70121951219512L111.54268292682927,80.44512195121952L100.56707317073172,113.3719512195122L98.73780487804879,168.25000000000003L103.3109756097561,183.7987804878049L118.85975609756099,203.00609756097563L156.359756097561,220.38414634146343L175.56707317073173,226.78658536585368L204.83536585365857,245.9939024390244Z', 'type': 'path', 'xref': 'x', 'yref': 'y'}, {'line': {'color': 'white', 'width': 2, 'dash': 'solid'}, 'type': 'line', 'x0': 0.9299999999999999, 'x1': 0.95, 'xref': 'paper', 'y0': 0.05, 'y1': 0.05, 'yref': 'paper', 'editable': True, 'label': {'text': ''}, 'layer': 'above', 'opacity': 1, 'fillcolor': 'rgba(0,0,0,0)', 'fillrule': 'evenodd', 'path': 'M243.25,230.44512195121953L288.9817073170732,158.18902439024393L299.9573170731707,141.72560975609758L302.7012195121951,130.75000000000003L299.0426829268293,117.03048780487805L287.1524390243903,101.48170731707317L271.6036585365854,94.16463414634147L250.5670731707317,92.33536585365854L181.96951219512198,106.0548780487805L167.33536585365857,103.3109756097561L128.9207317073171,80.44512195121952L117.03048780487805,77.70121951219512L111.54268292682927,80.44512195121952L100.56707317073172,113.3719512195122L98.73780487804879,168.25000000000003L103.3109756097561,183.7987804878049L118.85975609756099,203.00609756097563L156.359756097561,220.38414634146343L175.56707317073173,226.78658536585368L204.83536585365857,245.9939024390244Z'}]
I still receive this error:
Invalid property specified for object of type plotly.graph_objs.layout.shape.Label: 'texttemplate'
despite removing this key from the all of the shapes in the shape dictionary through the callback.
I use dash components in my Flask app to render shapes on a
dcc.Graph
figure input. Oftentimes, this involves appending a list of shapes to the graph using the formula below:In the example above, a series of circles are generated around centroids for objects in the graph. This scheme generally works well, but occasionally there will be in the following error when calling
go.Figure(self.figure)
:When I evaluate the shapes, sometimes they have a strange property added to them:
It appears that plotly will randomly generate the
label
portion of the shape dictionary with a blank text template, which causes an error. It seems to happen indiscriminately and without a discernible pattern.By comparison, most shapes appear to have a valid dictionary structure: