dash icon indicating copy to clipboard operation
dash copied to clipboard

No Layout Exception when using string elements when the layout is a list

Open AnnMarieW opened this issue 1 year ago • 0 comments

In all versions of Dash this works:

app.layout = html.Div(["Select City", dcc.Dropdown()])

In dash >= 2.17, this will throw an error:

app.layout = ["Select City", dcc.Dropdown()]

Here is a full example. When I run the app, I see the following error. After refreshing the screen it works fine.

from dash import Dash, dcc
app = Dash(__name__)

app.layout = ["Select City", dcc.Dropdown()]

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


image

AnnMarieW avatar Jun 17 '24 16:06 AnnMarieW