Skip to content

Unresolvable parent causes silent failure in sunburst #3153

Closed
@athompso

Description

@athompso

When using the sunburst class in PX, providing a parent value that is missing will cause plotly to neither throw an error nor display a graph. Quite difficult to troubleshoot when the data matrix is large.

Example, with one additional character added to a parent taken from https://plotly.com/python/sunburst-charts/:

import plotly.express as px
data = dict(
    character=["Eve", "Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
    parent=["", "Evie", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ],
    value=[10, 14, 12, 10, 2, 6, 6, 4, 4])

fig =px.sunburst(
    data,
    names='character',
    parents='parent',
    values='value',
)
a=fig.show()

Note the deliberate typo of "Evie" instead of "Eve" in the parent=[] list. This causes a totally silent failure, as far as I can see. No exception is raised, no error output is visible in the HTML source, zip, zilch, nada.

Using plotly v0.8.0 installed via pip on python 3.8.3 Win64.

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