biggboss2019
biggboss2019

Reputation: 300

Error: An exception has occurred, use %tb to see the full traceback for Dash App in Python Jupyter Notebook

I am following this tutorial for building Simple Dash App. However, when I run below code, I am getting error that says: "An exception has occurred, use %tb to see the full traceback."

Note: I am running below code in Jupyter Notebook.If I exclude debug=True, then App runs fine. However, when I make edit to the app and save the edit, it will not render in app.

Please suggest work around for this.

Code:

app = dash.Dash()

app.layout = html.Div(
html.H1(children="Hello000")
)
if __name__ == '__main__':
    app.run_server(debug=True)

Upvotes: 2

Views: 18758

Answers (1)

pegah
pegah

Reputation: 859

Ther are two ways: (1) In your code, set the debug=False, (2) set the use_reloader=False regardless of what debug is. In either case, it works fine inside the Jupyter Notebook:

app = dash.Dash()

app.layout = html.Div(
html.H1(children="Hello000")
)
if __name__ == '__main__':
    app.run_server(debug=True, use_reloader=False)  <---- Here

(Click on the URL it gives you, your app is running there.)

Upvotes: 9

Related Questions