Hi,
I am trying to follow the code found on Dash-by-Plotly/app.py at master · Coding-with-Adam/Dash-by-Plotly · GitHub
I copied it word for word to try and set up the page before I insert my own pages. But for some reason the links for page 2 and 3 don’t work. I get the same page shown for all 3 links and only the url changes:

Here is the code:
import dash
from dash import html, dcc
app = dash.Dash(name, use_pages=True)
app.layout = html.Div(
[
# main app framework
html.Div(“Python Multipage App with Dash”, style={‘fontSize’:50, ‘textAlign’:‘center’}),
html.Div([
dcc.Link(page[‘name’]+" | ", href=page[‘path’])
for page in dash.page_registry.values()
]),
html.Hr(),
# content of each page
dash.page_container
]
)
if name == “main”:
app.run_server(host = ‘0.0.0.0’, port = 20172)
pg1 code:
import dash
from dash import dcc, html
import plotly.express as px
dash.register_page(name, path=‘/’)
df = px.data.gapminder()
layout = html.Div(
[
dcc.Dropdown([x for x in df.continent.unique()], id=‘cont-choice’, style={‘width’:‘50%’}),
dcc.Graph(id=‘line-fig’,
figure=px.histogram(df, x=‘continent’, y=‘lifeExp’, histfunc=‘avg’))
]
)
pg2 code:
import dash
from dash import dcc, html
import plotly.express as px
dash.register_page(name)
df = px.data.tips()
layout = html.Div(
[
dcc.RadioItems([x for x in df.day.unique()], id=‘day-choice’),
dcc.Graph(id=‘bar-fig’,
figure=px.bar(df, x=‘smoker’, y=‘total_bill’))
]
)
pg3 code:
import dash
from dash import dcc, html
dash.register_page(name)
layout = html.Div(
[
dcc.Markdown(‘# This will be the content of Page 3’)
]
)