Closed
Description
Describe your context
dash 2.16.1
dash-bootstrap-components 1.5.0
dash-core-components 2.0.0
dash-daq 0.5.0
dash-html-components 2.0.0
dash-iconify 0.1.2
dash-mantine-components 0.12.1
dash-table 5.0.0
-
if frontend related, tell us your Browser, Version and OS
- OS: Windows
- Browser Chrome
Describe the bug
I run this example app:
# Run this app with `python app.py` and
# visit http://127.0.0.1:8050/ in your web browser.
from dash import Dash, dcc, html
import plotly.express as px
import pandas as pd
app = Dash(__name__)
colors = {
'background': '#111111',
'text': '#7FDBFF'
}
# assume you have a "long-form" data frame
# see https://plotly.com/python/px-arguments/ for more options
df = pd.DataFrame({
"Fruit": ["Apples", "Oranges", "Bananas", "Apples", "Oranges", "Bananas"],
"Amount": [4, 1, 2, 2, 4, 5],
"City": ["SF", "SF", "SF", "Montreal", "Montreal", "Montreal"]
})
fig = px.bar(df, x="Fruit", y="Amount", color="City", barmode="group")
fig.update_layout(
plot_bgcolor=colors['background'],
paper_bgcolor=colors['background'],
font_color=colors['text']
)
app.layout = html.Div(style={'backgroundColor': colors['background']}, children=[
html.H1(
children='Hello Dash',
style={
'textAlign': 'center',
'color': colors['text']
}
),
html.Div(children='Dash: A web application framework for your data.', style={
'textAlign': 'center',
'color': colors['text']
}),
dcc.Graph(
id='example-graph-2',
figure=fig
)
])
if __name__ == '__main__':
app.run(debug=True)
On startup, the app loads fine.
When I change something in my code, and the page reloads in the browser, I get the following error:
If I refresh the browser, the app loads again without problems.
This happens after upgrading my dash version, so could be related to a bug in the later versions.
Expected behavior
The page should reload without problems with debug=True
.
Screenshots
See above
Metadata
Metadata
Assignees
Labels
No labels