【发布时间】:2019-09-06 04:18:38
【问题描述】:
我正在尝试在 python 中使用 Dash 模块构建仪表板,但是当我运行以下代码时,没有任何弹出。
我手动将http://127.0.0.1:8050/ 复制并粘贴到网络浏览器,但它显示“无法访问此站点”
import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
app.layout = html.Div('Dash')
if __name__ == '__main__':
app.run_server(debug=True)
这是我收到的错误消息:
import dash...
Running on http://127.0.0.1:8050/
Running on http://127.0.0.1:8050/
Debugger PIN:
Debugger PIN:
* 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
【问题讨论】:
-
我复制并粘贴了您的代码以在我的机器上运行。它工作正常,页面加载显示“Dash”。
标签: python plotly-dash