title: Flask and uWSGI - unable to load app 0 (mountpoint='') (callable not found or import error)
body: <p>I get the below error when I try and start Flask using uWSGI.
  Here is how I start:</p>
  
  <pre><code>&gt;  # cd ..
  &gt;     root@localhost:# uwsgi --socket 127.0.0.1:6000 --file /path/to/folder/run.py --callable app -  -processes 2
  </code></pre>
  
  <p>Here is my directory structure:</p>
  
  <pre><code>-/path/to/folder/run.py
        -|app
            -|__init__.py
            -|views.py
            -|templates
            -|static
  </code></pre>
  
  <p>Contents of <code>/path/to/folder/run.py</code></p>
  
  <pre><code>if __name__ == '__main__':
     from app import app
     #app.run(debug = True)
     app.run()
  </code></pre>
  
  <p>Contents of <code>/path/to/folder/app/__init__.py</code></p>
  
  <pre><code>import os
  from flask import Flask
  from flask.ext.sqlalchemy import SQLAlchemy
  from flask.ext.login import LoginManager
  #from flaskext.babel import Babel
  from config import basedir
  app = Flask(__name__)
  app.config.from_object('config')
  #app.config.from_pyfile('babel.cfg')
  
  db = SQLAlchemy(app)
  login_manager = LoginManager()
  login_manager.setup_app(app)
  login_manager.login_view = 'login'
  login_manager.login_message = u"Please log in to access this page."
  
  from app import views
  
  *** Operational MODE: preforking ***
  unable to find "application" callable in file /path/to/folder/run.py
  unable to load app 0 (mountpoint='') (callable not found or import error)
  *** no app loaded. going in full dynamic mode ***
  *** uWSGI is running in multiple interpreter mode ***
  spawned uWSGI worker 1 (pid: 26972, cores: 1)
  spawned uWSGI worker 2 (pid: 26973, cores: 1)
  </code></pre>