将Dash应用程序部署到Heroku-dash_bootstrap_components-错误

我是heroku的新手,正在尝试部署在本地成功运行的Dash应用程序。
看来是“ dash_bootstrap_components”是元凶。我已经确认“ dash.bootstrap_components”已在requirements.txt文件中列出。
我的控制台表明Heroku成功构建了该应用程序,但是当我转到路径而不是加载网站时,它显示“不允许使用方法”。

Warning: heroku update available from 7.25.0 to 7.35.0.
2019-11-21T05:48:29.363914+00:00 app[web.1]: worker.init_process()
2019-11-21T05:48:29.363916+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py",line 129,in init_process
2019-11-21T05:48:29.363918+00:00 app[web.1]: self.load_wsgi()
2019-11-21T05:48:29.363919+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py",line 138,in load_wsgi
2019-11-21T05:48:29.363924+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2019-11-21T05:48:29.363927+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py",line 67,in wsgi
2019-11-21T05:48:29.363929+00:00 app[web.1]: self.callable = self.load()
2019-11-21T05:48:29.363931+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py",line 52,in load
2019-11-21T05:48:29.363933+00:00 app[web.1]: return self.load_wsgiapp()
2019-11-21T05:48:29.363935+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py",line 41,in load_wsgiapp
2019-11-21T05:48:29.363937+00:00 app[web.1]: return util.import_app(self.app_uri)
2019-11-21T05:48:29.363939+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py",line 350,in import_app

2019-11-21T05:48:29.363941+00:00 app[web.1]: __import__(module)
2019-11-21T05:48:29.363943+00:00 app[web.1]: File "/app/index.py",line 5,in <module>
2019-11-21T05:48:29.363945+00:00 app[web.1]: import dash_bootstrap_components as dbc
2019-11-21T05:48:29.363953+00:00 app[web.1]: ModuleNotFoundError: No module named 'dash_bootstrap_components'
2019-11-21T05:48:29.364677+00:00 app[web.1]: [2019-11-21 05:48:29 +0000] [11] [INFO] Worker exiting (pid: 11)
2019-11-21T05:48:29.673741+00:00 app[web.1]: [2019-11-21 05:48:29 +0000] [4] [INFO] Shutting down: Master
2019-11-21T05:48:29.673932+00:00 app[web.1]: [2019-11-21 05:48:29 +0000] [4] [INFO] Reason: Worker failed to boot.
2019-11-21T05:48:29.790633+00:00 heroku[web.1]: State changed from up to crashed
2019-11-21T05:48:29.774408+00:00 heroku[web.1]: Process exited with status 3
2019-11-21T05:54:34.000000+00:00 app[api]: Build started by user michaelwgeorge@gmail.com
2019-11-21T05:55:20.450356+00:00 heroku[web.1]: State changed from crashed to starting
2019-11-21T05:55:20.090603+00:00 app[api]: Release v11 created by user michaelwgeorge@gmail.com
2019-11-21T05:55:20.090603+00:00 app[api]: Deploy 390f2a3d by user michaelwgeorge@gmail.com
2019-11-21T05:55:34.449060+00:00 heroku[web.1]: Starting process with command `gunicorn index:app`
2019-11-21T05:55:37.173577+00:00 heroku[web.1]: State changed from starting to up
2019-11-21T05:55:36.793273+00:00 app[web.1]: [2019-11-21 05:55:36 +0000] [4] [INFO] Starting gunicorn 19.9.0
2019-11-21T05:55:36.794234+00:00 app[web.1]: [2019-11-21 05:55:36 +0000] [4] [INFO] Listening at: http://0.0.0.0:25245 (4)
2019-11-21T05:55:36.794410+00:00 app[web.1]: [2019-11-21 05:55:36 +0000] [4] [INFO] Using worker: sync
2019-11-21T05:55:36.798979+00:00 app[web.1]: [2019-11-21 05:55:36 +0000] [10] [INFO] Booting worker with pid: 10
2019-11-21T05:55:36.884473+00:00 app[web.1]: [2019-11-21 05:55:36 +0000] [11] [INFO] Booting worker with pid: 11
2019-11-21T05:55:37.000000+00:00 app[api]: Build succeeded
2019-11-21T05:55:42.316526+00:00 app[web.1]: Application object must be callable.
2019-11-21T05:55:42.317037+00:00 app[web.1]: [2019-11-21 05:55:42 +0000] [10] [INFO] Worker exiting (pid: 10)
2019-11-21T05:55:42.345490+00:00 app[web.1]: Application object must be callable.
2019-11-21T05:55:42.346001+00:00 app[web.1]: [2019-11-21 05:55:42 +0000] [11] [INFO] Worker exiting (pid: 11)
2019-11-21T05:55:42.649796+00:00 app[web.1]: [2019-11-21 05:55:42 +0000] [4] [INFO] Shutting down: Master
2019-11-21T05:55:42.649915+00:00 app[web.1]: [2019-11-21 05:55:42 +0000] [4] [INFO] Reason: App failed to load.
2019-11-21T05:55:42.738156+00:00 heroku[web.1]: State changed from up to crashed
2019-11-21T05:55:42.716345+00:00 heroku[web.1]: Process exited with status 4
2019-11-21T06:00:45.813616+00:00 heroku[web.1]: State changed from crashed to starting
2019-11-21T06:01:00.063199+00:00 heroku[web.1]: Starting process with command `gunicorn index:app`
2019-11-21T06:01:02.637789+00:00 app[web.1]: [2019-11-21 06:01:02 +0000] [4] [INFO] Starting gunicorn 19.9.0
2019-11-21T06:01:02.638666+00:00 app[web.1]: [2019-11-21 06:01:02 +0000] [4] [INFO] Listening at: http://0.0.0.0:18421 (4)
2019-11-21T06:01:02.638817+00:00 app[web.1]: [2019-11-21 06:01:02 +0000] [4] [INFO] Using worker: sync
2019-11-21T06:01:02.643810+00:00 app[web.1]: [2019-11-21 06:01:02 +0000] [10] [INFO] Booting worker with pid: 10
2019-11-21T06:01:02.669816+00:00 app[web.1]: [2019-11-21 06:01:02 +0000] [11] [INFO] Booting worker with pid: 11
2019-11-21T06:01:03.192457+00:00 heroku[web.1]: State changed from starting to up
2019-11-21T06:01:08.247285+00:00 app[web.1]: Application object must be callable.
2019-11-21T06:01:08.247748+00:00 app[web.1]: Application object must be callable.
2019-11-21T06:01:08.248176+00:00 app[web.1]: [2019-11-21 06:01:08 +0000] [10] [INFO] Worker exiting (pid: 10)
2019-11-21T06:01:08.248699+00:00 app[web.1]: [2019-11-21 06:01:08 +0000] [11] [INFO] Worker exiting (pid: 11)
2019-11-21T06:01:08.444836+00:00 app[web.1]: Traceback (most recent call last):
wangruiyue 回答:将Dash应用程序部署到Heroku-dash_bootstrap_components-错误

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3058231.html

大家都在问