I am working on a flask application which is hosted on heroku, but am getting the errors, with the log described below. While doing heroku push
, it says deployed, but there are errors.
I referred to the solutions given here didn't work.
My requirements.txt
also has gunicorn==20.0.4
tree
├── app.py
├── notes.md
├── Procfile
├── PySripts
│ ├── df_text.py
│ ├── pandas_implementation.py
│ └── wordcloud_generator.py
├── README.md
├── requirements.txt
├── runtime.txt
├── static
│ ├── css
│ │ ├── nouislider.min.css
│ │ └── style.css
│ └── js
│ ├── nouislider.min.js
│ └── slider.js
└── templates
├── base.html
├── index.html
└── uploader.html
Procfile
web: gunicorn app:app
runtime.txt
python-3.8.1
app.py
import .......
...
app = Flask(__name__)
...
if __name__ == '__main__':
app.run()
heroku logs --tail
2020-09-07T08:40:42.427035+00:00 heroku[web.1]: State changed from down to starting
2020-09-07T08:40:47.478352+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2020-09-07T08:40:49.594399+00:00 app[web.1]: bash: gunicorn: command not found
2020-09-07T08:40:49.660467+00:00 heroku[web.1]: Process exited with status 127
2020-09-07T08:40:49.697441+00:00 heroku[web.1]: State changed from starting to crashed
2020-09-07T08:40:49.699767+00:00 heroku[web.1]: State changed from crashed to starting
2020-09-07T08:40:56.000000+00:00 app[api]: Build succeeded
2020-09-07T08:40:56.602961+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2020-09-07T08:40:58.787088+00:00 app[web.1]: bash: gunicorn: command not found
2020-09-07T08:40:58.840299+00:00 heroku[web.1]: Process exited with status 127
2020-09-07T08:40:58.877891+00:00 heroku[web.1]: State changed from starting to crashed
2020-09-07T08:41:28.454489+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=url.herokuapp.com request_id=0aa5b8f7-0d40-4eec-9926-17a0710180f7 fwd="59.153.123.50" dyno= connect= service= status=503 bytes= protocol=https
2020-09-07T08:41:30.971411+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=<url>.herokuapp.com request_id=f2632ade-6667-4ea1-b6bb-19e37c5c4192 fwd="59.153.123.50" dyno= connect= service= status=503 bytes= protocol=https
2020-09-07T08:42:37.641728+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=<url>.herokuapp.com request_id=ee3ddc59-acd4-44d3-ae0f-4fd8776c9138 fwd="47.31.56.151" dyno= connect= service= status=503 bytes= protocol=https
2020-09-07T08:42:38.286427+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=<url>.herokuapp.com request_id=dffd9c0e-8ca0-451c-8304-94f57215cbf1 fwd="47.31.56.151" dyno= connect= service= status=503 bytes= protocol=https
2020-09-07T09:05:49.534642+00:00 heroku[web.1]: State changed from crashed to starting
2020-09-07T09:05:55.589238+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2020-09-07T09:05:57.673299+00:00 app[web.1]: bash: gunicorn: command not found
2020-09-07T09:05:57.713334+00:00 heroku[web.1]: Process exited with status 127
2020-09-07T09:05:57.768159+00:00 heroku[web.1]: State changed from starting to crashed
2020-09-07T09:57:15.420050+00:00 heroku[web.1]: State changed from crashed to starting
2020-09-07T09:57:22.078030+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2020-09-07T09:57:25.034851+00:00 app[web.1]: bash: gunicorn: command not found
2020-09-07T09:57:25.095998+00:00 heroku[web.1]: Process exited with status 127
2020-09-07T09:57:25.158429+00:00 heroku[web.1]: State changed from starting to crashed
heroku local
5:35:18 PM web.1 | [2020-09-07 17:35:18 +0530] [28559] [INFO] Starting gunicorn 20.0.4
5:35:18 PM web.1 | [2020-09-07 17:35:18 +0530] [28559] [INFO] Listening at: http://0.0.0.0:5000 (28559)
5:35:18 PM web.1 | [2020-09-07 17:35:18 +0530] [28559] [INFO] Using worker: sync
5:35:18 PM web.1 | [2020-09-07 17:35:18 +0530] [28562] [INFO] Booting worker with pid: 28562