python runs fine at local but doesn't not run at deployoment with heroku

I am having an issue while deploying my app at heroku. I have followed tutorials including dash tutorial and some others but still I cannot find out what I am doing wrong. Step by step I do this: 1- create a virtual env (using pipenv) during my deployment 2- after code is correct I run all repositories as should it be done (freeze >requirements.txt) and lock my requirements etc… 3- move to GIT and here is something I have not seen anayone to do: I use LFS because I have some code from MATLAB with large dataset which my app loads. 4- I don’t use CLI to deploy heroku becuase of the push limitations with lfs, so instead I link my GIThub repository directly at heroku website. 5- manually deploy the brach.

After this heroku is happy and deploys my app but when I go to the webdeployed something wrong happens. I tried to update dinos but it is also not ok.

Here is my github repository if someone would like to try to deploy it: https://github.com/jmbruges/pcV3.git

this is the log errors I get in heroku:

019-05-08T08:17:37.782961+00:00 app[api]: Release v4 created by user javier.bruges@miun.se

2019-05-08T08:18:12.000000+00:00 app[api]: Build succeeded

2019-05-08T08:18:16.420769+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=pc-poincare-v3.herokuapp.com request_id=7e0bcbda-7e0a-4044-bad3-93b0c3032b2b fwd="193.10.110.224" dyno= connect= service= status=503 bytes= protocol=https

2019-05-08T08:20:14.395096+00:00 app[api]: Starting process with command `heroku ps:scale web=1` by user javier.bruges@miun.se

2019-05-08T08:20:26.411807+00:00 heroku[run.1831]: State changed from starting to up

2019-05-08T08:20:26.213707+00:00 heroku[run.1831]: Awaiting client

2019-05-08T08:20:26.516875+00:00 heroku[run.1831]: Starting process with command `heroku ps:scale web=1`

2019-05-08T08:20:30.827949+00:00 heroku[run.1831]: State changed from up to complete

2019-05-08T08:20:30.809159+00:00 heroku[run.1831]: Process exited with status 127

2019-05-08T08:58:32.680284+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=pc-poincare-v3.herokuapp.com request_id=03606f5e-1d4c-42a8-8f5e-a4ae7a051958 fwd="193.10.110.224" dyno= connect= service= status=503 bytes= protocol=https

Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...

Your issue seems to be “No web processes running”.

I think you need to do the following:

  • pip install gunicorn
  • create a new file called Procfile
  • include this line in the file: web: gunicorn app:server
  • in your app.py file after defining app define server = app.server (you already have it but it is commented out).

Here’s a full example from the docs: https://dash.plot.ly/deployment

Hope that helps!