我不能 运行 dash plotly map

I can't run dash plotly map

我正在学习如何在我的项目中使用 dash 和 plotly。我正在尝试 运行 下面的示例代码:

import dash

app = dash.Dash()

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

但这一直在发生:

Dash is running on 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

并且代码单元格上出现了一个“x”,因此代码无效。频道“http://127.0.0.1:8050/”一直在加载,也没有任何反应。

你能帮帮我吗?

Jupyter notebook 发生在我身上。如果debug = True:

,你应该关闭自动重新加载use_reloader=False
import dash
from dash import html


app = dash.Dash()

app.layout = html.Div(
html.H1("Hello000")
)

if __name__ == '__main__':
    app.run_server(debug=True,use_reloader=False)

documentation中:

For example, to turn off the automatic reloader but keep the rest of the development features, you could run:

app.run_server(debug=True, use_reloader=False)