title: Flask + uwsgi + nginx: TypeError: ... takes no arguments (2 given)
body: <p>I installed uwsgi with nginx on my ubuntu 12.04 homerserver and try to test a simple Flask-App:</p>
  
  <pre><code>from flask import Flask
  app = Flask(__name__)
  
  @app.route('/')
  def application():
      return 'Hello World!'
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  
  <p>with <code>python app.py</code> it works. 
  But not with <code>uwsgi --socket 127.0.0.1:3031 --file /srv/www/test/app.py --callable application --catch-exceptions</code></p>
  
  <p>I just get a this error <code>TypeError: application() takes no arguments (2 given)</code> and don't know why. Where this two arguments come from?</p>
  
  <p>Here is my uwsgi.conf:</p>
  
  <pre><code>  1 description "uWSGI Emperor"
    2 start on runlevel [2345]
    3 stop on runlevel [06]
    4 respawn
    5
    6 exec uwsgi --master --die-on-term --emperor /etc/uwsgi/apps-enabled
  </code></pre>
  
  <p>and my nginx.conf</p>
  
  <pre><code>server {
   94      listen 8000;
   95      server_name localhost;
   96      root /srv/www/test;
   97
   98      location /static/ {
   99      alias /srv/www/test/static/;
  100      expires 30d;
  101      access_log off;
  102      }
  103
  104      location / {
  105      include uwsgi_params;
  106      uwsgi_pass 127.0.0.1:3031;
  107  }
  108 }
  </code></pre>
  
  <p>i try it before with an .ini-file in apps-enabled but i get this way errors too.</p>
  
  <p>I hope that someone can help me. :\</p>