# An exception has occurred, use %tb to see the full traceback

**URL:** <https://community.plotly.com/t/an-exception-has-occurred-use-tb-to-see-the-full-traceback/44440>\
**Category:** Dash Python\
**Created:** [September 2, 2020, 8:03am UTC](https://community.plotly.com/t/an-exception-has-occurred-use-tb-to-see-the-full-traceback/44440 "2020-09-02T08:03:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tezzle](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@tezzle](https://community.plotly.com/u/tezzle)\
**Post date:** [September 2, 2020, 8:03am UTC](https://community.plotly.com/t/an-exception-has-occurred-use-tb-to-see-the-full-traceback/44440/1 "2020-09-02T08:03:17Z")

</div>

Dash is running on [http://127.0.0.1:8050/](http://127.0.0.1:8050/)

- Serving Flask app “ **main** ” (lazy loading)
- Environment: production  
WARNING: This is a development server. Do not use it in a production deployment.  
Use a production WSGI server instead.
- Debug mode: on  
An exception has occurred, use %tb to see the full traceback.

SystemExit: 1

Getting above error when trying to run below code-

import dash  
import dash\_core\_components as dcc  
import dash\_html\_components as html  
import plotly.express as px  
import pandas as pd

external\_stylesheets = [‘[https://codepen.io/chriddyp/pen/bWLwgP.css](https://codepen.io/chriddyp/pen/bWLwgP.css)’]

app = dash.Dash( **name** , external\_stylesheets=external\_stylesheets)

colors = {  
‘background’: ‘#111111’,  
‘text’: ‘#7FDBFF’  
}

# assume you have a “long-form” data frame

# see [Plotly express arguments in Python](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 Python.', style={
    'textAlign': 'center',
    'color': colors['text']
}),

dcc.Graph(
    id='example-graph-2',
    figure=fig
)

```

])  
if **name** == ‘ **main** ’:  
app.run\_server(debug=True)

Please help
