Skip to content
Advertisement

Google App Engine deployment issue- main app not found

I am trying to deploy my app using Google App Engine. I have edited app.yaml to reflect the flexible environment and also gave all the app information. Below is the app.yaml file.

JavaScript

Once the deployment is in progress, I am getting the following error

JavaScript

Please note that App Deployed is the line in my print statement. It is getting executed. But the deployment is getting failed

Thank you in advance

Advertisement

Answer

In your app.yaml, you’re starting gunicorn with gunicorn -b :$PORT main:app. This tells it to look for the object app in the file main.py

The error you’re getting comes from gunicorn and occurs when you have a main.py file, but it does not have an app object in it.

You probably want to set up a Flask app as follows:

JavaScript

See a full example app here: https://cloud.google.com/appengine/docs/flexible/python/quickstart#hello_world_code_review

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement