每次我尝试运行破折号应用程序时出现Traceback错误

时间:2018-07-23 11:37:37

标签: python plotly dashboard plotly-dash

我是dash的新手,我进行了dash,dash-core-components,dash-html-components的初始安装。

但是每次我运行此代码或任何其他与破折号相关的代码时,都会遇到多个回溯错误。请提出解决此问题的方法。谢谢:)

import dash
import dash_core_components as dcc
import dash_html_components as html

app=dash.Dash()

app.layout=html.Div(children=[
html.H1('Server Uptime'),
dcc.Graph(id='Uptime',
          figure={'data':[
              {'x':[1,2,3], 'y':[5,4,7], 'type':'bar','name':'Serverstuff'}],
              'layout':{'title':'Basic Example'
              }
          })
])
if __name__=='__main__':
    app.run_server(debug=True)

错误:

Traceback (most recent call last):
  File "C:\Users\agk98\AppData\Local\Programs\Python\Python36-32\new.py", line 17, in <module>
    app.run_server(debug=True)
  File "C:\Users\agk98\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dash\dash.py", line 568, in run_server
    self.server.run(port=port, debug=debug, **flask_run_options)
  File "C:\Users\agk98\AppData\Local\Programs\Python\Python36-32\lib\site-packages\flask\app.py", line 938, in run
    cli.show_server_banner(self.env, self.debug, self.name, False)
  File "C:\Users\agk98\AppData\Local\Programs\Python\Python36-32\lib\site-packages\flask\cli.py", line 629, in show_server_banner
    click.echo(message)
  File "C:\Users\agk98\AppData\Local\Programs\Python\Python36-32\lib\site-packages\click\utils.py", line 217, in echo
    file = _default_text_stdout()
  File "C:\Users\agk98\AppData\Local\Programs\Python\Python36-32\lib\site-packages\click\_compat.py", line 621, in func
    rv = wrapper_func()
  File "C:\Users\agk98\AppData\Local\Programs\Python\Python36-32\lib\site-packages\click\_compat.py", line 385, in get_text_stdout
    rv = _get_windows_console_stream(sys.stdout, encoding, errors)
  File "C:\Users\agk98\AppData\Local\Programs\Python\Python36-32\lib\site-packages\click\_winconsole.py", line 261, in _get_windows_console_stream
    func = _stream_factories.get(f.fileno())
io.UnsupportedOperation: fileno

0 个答案:

没有答案