successfully deployed flask app but getting a 404 when accessing the page successfully deployed flask app but getting a 404 when accessing the page flask flask

successfully deployed flask app but getting a 404 when accessing the page


I also had a same issue.I'm using flask 0.10 and now it works fine.

from example

from flask import Flaskapp = Flask(__name__)@app.route("/")     def hello():             return "Hello World!"if __name__ == "__main__":             app.run() 

to

from flask import Flaskapplication = Flask(__name__)  # Change assignment here@application.route("/")        # Change your route statementsdef hello():             return "Hello World!"if __name__ == "__main__":             application.run()          # Change all other references to 'app'

this link will help you.


I've figured out the error in my case. It's due to a WSGIPath error.

The error occurred because I have the application.py in the app/ folder. But because I ran the git .init command in its parent folder, EB errors out because it cannot find application.py file.

In short, the solution is to run "eb init" in the same location where you have your application.py file!