0

i have recently deployed my python flask app to heroku but the following error occurs:

2016-07-29T17:32:00.145010+00:00 heroku[web.1]: State changed from crashed to starting
2016-07-29T17:32:11.162187+00:00 heroku[web.1]: Starting process with command `gunicorn myapp:app --log-file=-`
2016-07-29T17:32:13.548294+00:00 heroku[web.1]: Process exited with status 3
2016-07-29T17:32:13.448537+00:00 app[web.1]: [2016-07-29 17:32:13 +0000] [3] [INFO] Starting gunicorn 19.6.0
2016-07-29T17:32:13.449154+00:00 app[web.1]: [2016-07-29 17:32:13 +0000] [3] [INFO] Listening at: http://0.0.0.0:57535 (3)
2016-07-29T17:32:13.456988+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2016-07-29T17:32:13.456990+00:00 app[web.1]:     return self.load_wsgiapp()
2016-07-29T17:32:13.456993+00:00 app[web.1]:   File "/app/myapp.py", line 71
2016-07-29T17:32:13.456994+00:00 app[web.1]:     data[i]={**a[i],**b,**c,**d,**e}
2016-07-29T17:32:13.563973+00:00 heroku[web.1]: State changed from starting to crashed
2016-07-29T17:32:14.847126+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=obscure-plateau-26852.herokuapp.com request_id=820cdbd3-d478-434b-be65-06f959ca2798 fwd="79.167.50.52" dyno= connect= service= status=503 bytes=
2016-07-29T17:32:14.370705+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=obscure-plateau-26852.herokuapp.com request_id=48a7f184-053b-4ba9-9833-a5e27df61867 fwd="79.167.50.52" dyno= connect= service= status=503 bytes=

i have tried changing the default ports etc. but the same error occurs.

Any ideas?

2
  • Is your project and app actually called myapp and app? Commented Jul 29, 2016 at 17:55
  • the python script that i run is called myapp.py thus i defined it as my app Commented Jul 29, 2016 at 18:03

1 Answer 1

1

Well, the answer is in the traceback. Error code H10 means the app crashed when Gunicorn tried to load it onto the dyno. There's an error at line 71 of your myapp.py file, the data[i]={**a[i],**b,**c,**d,**e} line. You may need to show the rest of your file to debug that.

Sign up to request clarification or add additional context in comments.

3 Comments

i actually do not get any errors when running this code locally.. thus can it be a related issue on the cloud?
Sure. But it'll be impossible to tell if you don't put a full MCVE question up.
the error was that the default python version was 2.7.12 and the respective command is not valid for this version. Thus i added a runtime.txt. file with the line :python-3.5.2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.