'Python, Plotly and Dash problem with code on theia IDE on IBM Skills Network Labs
Here is my code, my error is below when I run it.
app.layout = html.Div(children=[
# TASK1: Add title to the dashboard
# Enter your code below. Make sure you have correct formatting.
html.H1('US Domestic Airline Flights Performance' style={'textAlign': 'center', 'color': '#503D36', 'font-size': 24 })
# REVIEW2: Dropdown creation
# Create an outer division
html.Div([
# Add an division
html.Div([
# Create an division for adding dropdown helper text for report type
html.Div(
[
html.H2('Report Type:', style={'margin-right': '2em'}),
]
),
# TASK2: Add a dropdown
# Enter your code below. Make sure you have correct formatting.
dcc.Dropdown(id='input-type',
options=[
{'label': 'Yearly Airline Performance Report', 'value': 'OPT1'},
{'label': 'Yearly Airline Delay Report', 'value': 'OPT2'}
],
placeholder='Select a report type',
style={'width': '80%', 'padding': '3px', 'font-size': '20px', 'textAlign': 'center' }})
# Place them next to each other using the division style
], style={'display':'flex'}),

I get the error in the syntax, I fixed the initial H1 error by structuring the code better but later on I tried and I get a different syntax error near the styling in the flex part of the code, please help.
Solution 1:[1]
I think you're missing a comma in your html.H1 tag before the style parameter:
html.H1('US Domestic Airline Flights Performance', style={'textAlign': 'center', 'color': '#503D36', 'font-size': 24 })
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Derek O |
