No python application found - uWSGI + Flask + nginx

June 14, 2016 24.1k views
Python Frameworks Python Deployment Nginx Logging Ubuntu

After following this tutorial to set up flask on nginx and uwsgi ( on Ubuntu 14.04, I managed to get the simple app to work, however when I replace my app with it (with the same name), I'm getting an internal server error. At first this was due to the modules, but this persisted after installing all required modules.

Logging uwsgi it says "no python application found, check your startup logs for errors".

My python file (

app = Flask(__name__, static_folder='static', static_url_path='/static')
app.secret_key = 'askaj3432sd'

if __name__ == "__main__":, host='')


from portal import app

if __name__ == "__main__":
1 Answer

This question was answered by @centolaecebola:

try changing

from portal import app 


from portal import app as application

View the original comment

Have another answer? Share your knowledge.