0

I'm having trouble with heroku not successfully running my app. I have 3 key files:

  1. A python file with the core engine.
  2. A python file that calls the first python file and runs Flask to render_template into index.html, and
  3. An index.html file that uses the data generated from the core engine (via the second python file) to render the page.

I recorded all the dependencies needed in a requirements.txt file, and followed the "Deploying to Heroku" instructions on this boilerplate page.

After doing the git push heroku master I got an Application Error on the heroku app. Here's the heroku logs dump:

(venv)Bobs-MacBook-Pro:headline master$ heroku logs
2014-09-15T08:04:42.500102+00:00 heroku[api]: Enable Logplex by [email protected]
2014-09-15T08:04:42.500102+00:00 heroku[api]: Release v2 created by [email protected]
2014-09-15T08:10:32+00:00 heroku[slug-compiler]: Slug compilation started
2014-09-15T08:11:21+00:00 heroku[slug-compiler]: Slug compilation finished
2014-09-15T08:11:21.409088+00:00 heroku[api]: Deploy fa8d344 by [email protected]
2014-09-15T08:11:21.409184+00:00 heroku[api]: Release v3 created by [email protected]
2014-09-15T08:11:23.833224+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=headlyneme.herokuapp.com request_id=6ea6633a-4bfa-4cfa-9345-ac77f570e6a9 fwd="54.82.116.215" dyno= connect= service= status=503 bytes=
2014-09-15T08:11:55.722627+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=headlyneme.herokuapp.com request_id=ed7d46ba-cef2-4aef-bbe6-49e8244cb04c fwd="24.130.57.252" dyno= connect= service= status=503 bytes=
2014-09-15T08:11:56.045572+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=headlyneme.herokuapp.com request_id=08d43fc9-977a-4c89-86a3-267224fbb5a7 fwd="24.130.57.252" dyno= connect= service= status=503 bytes=

What am I doing wrong? I've run this locally on my Mac using app.run(debug=True) without any problems, as seen here. I'm guessing something's wrong in the sequence the python files are running?

4
  • How are you running your app in production? What does your Procfile look like? Commented Sep 15, 2014 at 8:42
  • Procfile only has web: gunicorn hello:app --log-file=-. I'm trying to use heroku to run the app in production– maybe I'm not understanding your question? Commented Sep 15, 2014 at 8:55
  • Do you have a requirements.txt file in the root of your repository? That's how Heroku knows you're working with Python, not Ruby or something else. Commented Sep 15, 2014 at 12:18
  • Yup. I did a dump of all the pip dependencies as instructed on the boilerplate page above. Includes: Flask>=0.10.1 Jinja2>=2.7.3 PyRSS2Gen==1.0.0 Werkzeug==0.9.6 bdist-mpkg==0.4.4 beautifulsoup4==4.3.2 pyOpenSSL==0.13 python-dateutil==1.5 python-googlegeocoder>=0.2.0 requests==2.3.0 virtualenv==1.11.6 wsgiref==0.1.2 xattr==0.6.4 Commented Sep 15, 2014 at 21:52

1 Answer 1

1

This usually occurs when you add your Procfile after you push your other files. Therefore, your heroku app is not aware of the Procfile and you don't have any dynos running.

Try running heroku ps:scale web=1 to form a dyno, which will hopefully allow your app to handle web requests. I hope this helps!

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

1 Comment

heroku ps:scale web=1 is Greaaaaaaat!

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.