尝试使用达世币应用程序时重新启动统计信息



我正在尝试学习python中的dash应用程序包,我从基本教程开始,如下所示,

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

但是我收到以下错误,

* Restarting with stat
An exception has occurred, use %tb to see the full traceback.
SystemExit: 1

当我输入%tb时,显示以下内容,

---------------------------------------------------------------------------
SystemExit                                Traceback (most recent call last)
<ipython-input-5-5d4a332652ef> in <module>()
     32 
     33 if __name__ == '__main__':
---> 34     app.run_server(debug=True)
C:UsersusernameAppDataLocalContinuumanaconda27libsite-packagesdashdash.pyc in run_server(self, port, debug, **flask_run_options)
    564                    debug=False,
    565                    **flask_run_options):
--> 566         self.server.run(port=port, debug=debug, **flask_run_options)
C:UsersusernameAppDataLocalContinuumanaconda27libsite-packagesflaskapp.pyc in run(self, host, port, debug, **options)
    839         options.setdefault('use_debugger', self.debug)
    840         try:
--> 841             run_simple(host, port, self, **options)
    842         finally:
    843             # reset the first request information if the development server
C:UsersusernameAppDataLocalContinuumanaconda27libsite-packageswerkzeugserving.pyc in run_simple(hostname, port, application, use_reloader, use_debugger, use_evalex, extra_files, reloader_interval, reloader_type, threaded, processes, request_handler, static_files, passthrough_errors, ssl_context)
    735         from werkzeug._reloader import run_with_reloader
    736         run_with_reloader(inner, extra_files, reloader_interval,
--> 737                           reloader_type)
    738     else:
    739         inner()
C:UsersusernameAppDataLocalContinuumanaconda27libsite-packageswerkzeug_reloader.pyc in run_with_reloader(main_func, extra_files, interval, reloader_type)
    263             reloader.run()
    264         else:
--> 265             sys.exit(reloader.restart_with_reloader())
    266     except KeyboardInterrupt:
    267         pass
SystemExit: 1

我已经尝试了几种方法来解决这个问题。但我找不到解决方案。任何人都可以帮助我解决这个问题吗?

谢谢

在禁用调试模式的情况下运行它:

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

相关内容

最新更新