Python Scraper
Python Scraper

Reputation: 15

Flask application deployed to Heroku returns Application Error

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?

Upvotes: 0

Views: 1505

Answers (1)

Muntaser Ahmed
Muntaser Ahmed

Reputation: 4657

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!

Upvotes: 1

Related Questions