plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.53k stars 2.07k forks source link

[BUG] Assigning None to exact or shape array properties causes exception #3010

Closed CNFeffery closed 2 months ago

CNFeffery commented 2 months ago

For array-type properties where individual elements are of type exact or shape, and each element accepts component-type sub-properties, assigning None to this array property can lead to some vague error messages. For example, with dcc.Dropdown:

image

import dash
from dash import html, dcc

app = dash.Dash(__name__)

app.layout = html.Div(
    [
        dcc.Dropdown(
            placeholder="Currently, there are no selectable options", options=None
        )
    ],
    style={"padding": 50},
)

if __name__ == "__main__":
    app.run(debug=True)