這是我第一次嘗試將 Flask 應用程式部署到 heroku。在嘗試這樣做時,我能夠成功構建它,但是當我打開應用程式時,我發現以下訊息:
Application error
An error occurred in the application and your page could not be served. If you are the
application owner, check your logs for details. You can do this from the Heroku CLI
with the command
檢查我的日志后,我得到以下資訊:
2021-11-21T03:23:43.909513 00:00 heroku[router]: at=error code=H10 desc="App crashed"
method=GET path="/" host=myapp.herokuapp.com request_id=6ca38bf1-291f-47b7-b736-
d80b1d331182 fwd="49.37.37.192" dyno= connect= service= status=503 bytes=
protocol=https
2021-11-21T03:23:44.906996 00:00 heroku[router]: at=error code=H10 desc="App crashed"
method=GET path="/favicon.ico" host=myapp.herokuapp.com request_id=34032e6e-0588-4904-
94f6-b7cacfef1364 fwd="49.37.37.192" dyno= connect= service= status=503 bytes=
protocol=https
作為這個領域的新手,我無法弄清楚這個錯誤意味著什么。我嘗試在互聯網上搜索,但沒有找到針對我的問題的資源。
附加資訊:
我正在使用 github,在 heroku 上我使用 GitHub 連接方法進行部署。
有人可以解釋一下這意味著什么以及如何解決它。
uj5u.com熱心網友回復:
主要方面是requirements.txt 檔案中缺少gunicorn。一旦完成,其他一切都正常。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/363941.html
上一篇:如何在Flutter中的CheckboxListTile中進行搜索?
下一篇:Heroku推送失敗
