【问题标题】:web application using dash in python在 python 中使用破折号的 Web 应用程序
【发布时间】:2019-10-05 17:58:10
【问题描述】:

我在 spyder 中使用 dash plotly 开发了一个简单的程序,但它显示了以下错误。

import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
app.layout = html.Div(
        html.H1(children='Hello Dash')
)
if __name__ == '__main__':
    app.run_server(debug=True)

但它显示了以下错误。

Running on http://127.0.0.1:8050/
Debugger PIN: 870-923-677
Traceback (most recent call last):

  File "<ipython-input-13-3c5b23764cd8>", line 5, in <module>
    app.run_server(debug=True)

  File "C:\Users\Hussnain\Anaconda3\lib\site-packages\dash\dash.py", line 1503, in run_server
    self.server.run(port=port, debug=debug, **flask_run_options)

  File "C:\Users\Hussnain\Anaconda3\lib\site-packages\flask\app.py", line 938, in run
    cli.show_server_banner(self.env, self.debug, self.name, False)

  File "C:\Users\Hussnain\Anaconda3\lib\site-packages\flask\cli.py", line 629, in show_server_banner
    click.echo(message)

  File "C:\Users\Hussnain\Anaconda3\lib\site-packages\click\utils.py", line 259, in echo
    file.write(message)

UnsupportedOperation: not writable

【问题讨论】:

    标签: dashboard plotly-dash


    【解决方案1】:

    Spyder 在使用Debug=True 时存在一些冲突。请在 Visual Studio Code 中运行您的代码。

    对于我的系统:您的代码运行良好。

    请告诉我们此软件交换是否解决了您的问题。如果没有,我将提供进一步的帮助。 :)

    【讨论】:

      猜你喜欢
      • 2021-03-09
      • 1970-01-01
      • 2021-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-09
      • 2022-01-05
      • 1970-01-01
      相关资源
      最近更新 更多