dash
dash copied to clipboard
No Layout Exception when using string elements when the layout is a list
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)