Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
AnnMarieW opened this issue Jun 17, 2024 · 0 comments · Fixed by #2900
Open

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

AnnMarieW opened this issue Jun 17, 2024 · 0 comments · Fixed by #2900
Labels
bug something broken P3 backlog

Comments

@AnnMarieW
Copy link
Collaborator

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

@gvwilson gvwilson assigned gvwilson and unassigned gvwilson Jul 26, 2024
@gvwilson gvwilson added P3 backlog bug something broken labels Aug 13, 2024
@gvwilson gvwilson changed the title [BUG] No Layout Exception when using string elements when the layout is a list No Layout Exception when using string elements when the layout is a list Aug 13, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants