UnsupportedOperation:如果__name__ =='__main__',则在运行时不可写:app.run_server()

时间:2019-08-16 16:10:26

标签: python plotly plotly-dash

我已经更新了破折号和conda,但是我无法运行破折号应用程序

当我运行此代码时:

if __name__ == '__main__':
app.run_server()

我收到此错误消息:

File "<ipython-input-1-37841e53b5c9>", line 1, in <module>
    runfile('/Users/rueben/Documents/Luca Faloni/task (v1)', wdir='/Users/rueben/Documents/Luca Faloni')

  File "/Users/rueben/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 710, in runfile
    execfile(filename, namespace)

  File "/Users/rueben/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 101, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/Users/rueben/Documents/Luca Faloni/task (v1)", line 193, in <module>
    app.run_server()

  File "/Users/rueben/anaconda3/lib/python3.6/site-packages/dash/dash.py", line 1694, in run_server
    self.server.run(port=port, debug=debug, **flask_run_options)

  File "/Users/rueben/anaconda3/lib/python3.6/site-packages/flask/app.py", line 985, in run
    cli.show_server_banner(self.env, self.debug, self.name, False)

  File "/Users/rueben/anaconda3/lib/python3.6/site-packages/flask/cli.py", line 670, in show_server_banner
    click.echo(message)

  File "/Users/rueben/anaconda3/lib/python3.6/site-packages/click/utils.py", line 259, in echo
    file.write(message)

UnsupportedOperation: not writable

0 个答案:

没有答案