✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

"This site can’t be reached127.0.0.1 refused to connect." Can't show the chart created with dash on Jupyternote book

This is my first time trying dash, and I copied paste the 1.2 Layout page code to get my first Dash plot. However, after I try to make my own graph using dash with new data, the website pop up shows that " This site can’t be reached refused to connect.". I googled online for explanations, people suggested to change the port to other numbers like “8080”. Some time it couldn’t reach the website, other times I just have the old plot shows. I am very confused about what went wrong.

import csv
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
import pandas as pd
df = pd.read_csv("topline_metrics.csv")
pv_dau = pd.pivot_table(df, index=['Country'], columns=["Platform"], values=['DAU'], aggfunc='mean', fill_value=0)
pv_tru = pd.pivot_table(df, index=['Country'], columns=["Platform"], values=['TRU'], aggfunc='mean', fill_value=0)
trace1 = go.Bar(x=pv_dau.index, y=pv_dau[('DAU', 'Android(All)')], name='Android_users')
trace2 = go.Bar(x=pv_tru.index, y=pv_tru[('TRU', 'Android(All)')], name='Android_users')
app = dash.Dash()
server = flask.Flask(__name__)
app = dash.Dash(__name__, server=server)

app.layout = html.Div(children=[
    html.H1(children='Sales Funnel Report'),
    html.Div(children='''National Sales Funnel Report.'''),
            'data': [trace1, trace2],
            go.Layout(title='Order Status by Customer', barmode='stack')

app.scripts.config.serve_locally = True
app.css.config.serve_locally = True

if __name__ == '__main__':

try setting ‘debug=False’ when working in jupyter

Hi Chriddyp

Thanks for responding, it doesn’t work when I change it to False, and now I have more problems with Dash.

This shows up when I try to import dash-core-conponents.