在Heroku上传我的Django应用
应用程序中出现错误,无法为您的页面提供服务。如果您是应用程序所有者,请检查日志以了解详细信息。您可以在Heroku CLI中使用命令Heroku logs——tail
来完成此操作heroku日志:
2021-10-19T10:46:06.255667+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=carpriceread.herokuapp.com request_id=704fd2ae-c1b2-4a0c-b359-dc215038a6f6 fwd="49.36.183.69" dyno= connect= service= status=503 bytes= protocol=https
2021-10-19T10:55:56.839196+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=carpriceread.herokuapp.com request_id=837a3401-418a-4063-91ec-2a97c89ada73 fwd="49.36.183.69" dyno= connect= service= status=503 bytes= protocol=https
2021-10-19T10:55:57.205478+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=carpriceread.herokuapp.com request_id=63d1e63e-f0aa-4f54-9989-7c7a423bc21d fwd="49.36.183.69" dyno= connect= service= status=503 bytes= protocol=https
2021-10-19T12:43:41.062044+00:00 heroku[web.1]: State changed from crashed to starting
2021-10-19T12:43:43.722991+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2021-10-19T12:43:44.543820+00:00 app[web.1]: bash: gunicorn: command not found
2021-10-19T12:43:44.669170+00:00 heroku[web.1]: Process exited with status 127
2021-10-19T12:43:44.788929+00:00 heroku[web.1]: State changed from starting to crashed
2021-10-19T16:27:49.633265+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=carpriceread.herokuapp.com request_id=6ef8172a-9ac4-403d-b2ee-4111dfd9767a fwd="49.36.183.69" dyno= connect= service= status=503 bytes= protocol=https
2021-10-19T16:27:50.150801+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=carpriceread.herokuapp.com request_id=dbd50e93-7749-47a4-a78d-3aa74b8a450a fwd="49.36.183.69" dyno= connect= service= status=503 bytes= protocol=https
回购链接:https://github.com/tan404/Predict-Car-Selling-Price
如果你在应用程序中使用虚拟环境,那么你必须pip安装gunicorn并创建一个配置文件,然后你必须在该配置文件中写一行,以便heroku可以检测到它,请参阅下面的视频寻求帮助。https://youtu.be/Li0Abz-KT78