heroku 应用程序成功部署但显示应用程序错误

时间:2021-06-05 04:32:33

标签: flask heroku application-error

heroku logs --tail --app fooodie-bot2021
 »   Warning: heroku update available from 7.53.0 to 7.54.0.
2021-06-04T18:44:13.667090+00:00 heroku[web.1]: Starting process with command `gunicorn --bind 0.0.0.0:58344 app:app`
2021-06-04T18:44:17.360140+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [4] [INFO] Starting gunicorn 20.1.0
2021-06-04T18:44:17.360928+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [4] [INFO] Listening at: http://0.0.0.0:58344 (4)
2021-06-04T18:44:17.361067+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [4] [INFO] Using worker: sync
2021-06-04T18:44:17.367156+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [7] [INFO] Booting worker with pid: 7
2021-06-04T18:44:17.375131+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [7] [ERROR] Exception in worker process
2021-06-04T18:44:17.375145+00:00 app[web.1]: Traceback (most recent call last):
2021-06-04T18:44:17.375147+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-06-04T18:44:17.375148+00:00 app[web.1]: worker.init_process()
2021-06-04T18:44:17.375149+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process       
2021-06-04T18:44:17.375149+00:00 app[web.1]: self.load_wsgi()
2021-06-04T18:44:17.375149+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-06-04T18:44:17.375150+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-06-04T18:44:17.375151+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-06-04T18:44:17.375152+00:00 app[web.1]: self.callable = self.load()
2021-06-04T18:44:17.375152+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-06-04T18:44:17.375152+00:00 app[web.1]: return self.load_wsgiapp()
2021-06-04T18:44:17.375153+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-06-04T18:44:17.375153+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-06-04T18:44:17.375154+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-06-04T18:44:17.375154+00:00 app[web.1]: mod = importlib.import_module(module)
2021-06-04T18:44:17.375154+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-06-04T18:44:17.375155+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-06-04T18:44:17.375155+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-06-04T18:44:17.375156+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-06-04T18:44:17.375156+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2021-06-04T18:44:17.375156+00:00 app[web.1]: ModuleNotFoundError: No module named 'app'
2021-06-04T18:44:17.375384+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-06-04T18:44:17.435219+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [4] [INFO] Shutting down: Master
2021-06-04T18:44:17.435220+00:00 app[web.1]: [2021-06-04 18:44:17 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-06-04T18:44:17.529984+00:00 heroku[web.1]: Process exited with status 3
2021-06-04T18:44:17.603954+00:00 heroku[web.1]: State changed from starting to crashed
2021-06-04T20:52:46.691043+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-04T20:52:53.880135+00:00 heroku[web.1]: Starting process with command `gunicorn --bind 0.0.0.0:32290 app:app`
2021-06-04T20:52:57.015064+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [4] [INFO] Starting gunicorn 20.1.0
2021-06-04T20:52:57.015457+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [4] [INFO] Listening at: http://0.0.0.0:32290 (4)
2021-06-04T20:52:57.015537+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [4] [INFO] Using worker: sync
2021-06-04T20:52:57.019297+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [7] [INFO] Booting worker with pid: 7
2021-06-04T20:52:57.025214+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [7] [ERROR] Exception in worker process
2021-06-04T20:52:57.025215+00:00 app[web.1]: Traceback (most recent call last):
2021-06-04T20:52:57.025216+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-06-04T20:52:57.025216+00:00 app[web.1]: worker.init_process()
2021-06-04T20:52:57.025217+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process       
2021-06-04T20:52:57.025217+00:00 app[web.1]: self.load_wsgi()
2021-06-04T20:52:57.025217+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-06-04T20:52:57.025218+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-06-04T20:52:57.025218+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-06-04T20:52:57.025219+00:00 app[web.1]: self.callable = self.load()
2021-06-04T20:52:57.025219+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-06-04T20:52:57.025219+00:00 app[web.1]: return self.load_wsgiapp()
2021-06-04T20:52:57.025220+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-06-04T20:52:57.025220+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-06-04T20:52:57.025220+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-06-04T20:52:57.025221+00:00 app[web.1]: mod = importlib.import_module(module)
2021-06-04T20:52:57.025221+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-06-04T20:52:57.025222+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-06-04T20:52:57.025222+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-06-04T20:52:57.025222+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-06-04T20:52:57.025223+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2021-06-04T20:52:57.025223+00:00 app[web.1]: ModuleNotFoundError: No module named 'app'
2021-06-04T20:52:57.025357+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-06-04T20:52:57.060273+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [4] [INFO] Shutting down: Master
2021-06-04T20:52:57.060339+00:00 app[web.1]: [2021-06-04 20:52:57 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-06-04T20:52:57.136841+00:00 heroku[web.1]: Process exited with status 3
2021-06-04T20:52:57.214462+00:00 heroku[web.1]: State changed from starting to crashed
2021-06-04T23:56:33.244581+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-04T23:56:41.153062+00:00 heroku[web.1]: Starting process with command `gunicorn --bind 0.0.0.0:44202 app:app`
2021-06-04T23:56:45.069131+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [4] [INFO] Starting gunicorn 20.1.0
2021-06-04T23:56:45.069673+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [4] [INFO] Listening at: http://0.0.0.0:44202 (4)
2021-06-04T23:56:45.069777+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [4] [INFO] Using worker: sync
2021-06-04T23:56:45.073690+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [7] [INFO] Booting worker with pid: 7
2021-06-04T23:56:45.078553+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [7] [ERROR] Exception in worker process
2021-06-04T23:56:45.078582+00:00 app[web.1]: Traceback (most recent call last):
2021-06-04T23:56:45.078588+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-06-04T23:56:45.078594+00:00 app[web.1]: worker.init_process()
2021-06-04T23:56:45.078594+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process       
2021-06-04T23:56:45.078595+00:00 app[web.1]: self.load_wsgi()
2021-06-04T23:56:45.078595+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-06-04T23:56:45.078595+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2021-06-04T23:56:45.078600+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-06-04T23:56:45.078601+00:00 app[web.1]: self.callable = self.load()
2021-06-04T23:56:45.078601+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-06-04T23:56:45.078601+00:00 app[web.1]: return self.load_wsgiapp()
2021-06-04T23:56:45.078602+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-06-04T23:56:45.078602+00:00 app[web.1]: return util.import_app(self.app_uri)
2021-06-04T23:56:45.078602+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
2021-06-04T23:56:45.078603+00:00 app[web.1]: mod = importlib.import_module(module)
2021-06-04T23:56:45.078603+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
2021-06-04T23:56:45.078604+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-06-04T23:56:45.078604+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2021-06-04T23:56:45.078605+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2021-06-04T23:56:45.078605+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
2021-06-04T23:56:45.078605+00:00 app[web.1]: ModuleNotFoundError: No module named 'app'
2021-06-04T23:56:45.078700+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-06-04T23:56:45.117467+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [4] [INFO] Shutting down: Master
2021-06-04T23:56:45.117651+00:00 app[web.1]: [2021-06-04 23:56:45 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-06-04T23:56:45.231963+00:00 heroku[web.1]: Process exited with status 3
2021-06-04T23:56:45.388008+00:00 heroku[web.1]: State changed from starting to crashed
2021-06-05T03:47:07.088448+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fooodie-bot2021.herokuapp.com request_id=aa2aa16a-bb5f-44d6-a6ea-4083e463693f fwd="42.106.107.86" dyno= connect= service= status=503 bytes= protocol=https
2021-06-05T03:47:07.663226+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fooodie-bot2021.herokuapp.com request_id=4e065a27-291a-4498-b690-f70f0df250cc fwd="42.106.107.86" dyno= connect= service= status=503 bytes= protocol=https

1 个答案:

答案 0 :(得分:0)

错误提示没有名为 app 的模块,请检查您的 python 文件是否名为 app,并且 Flask 实例是否等于 app。