title: Bottle App gives Internal Server Error when accessing default page
body: <p>I am just getting started with Bottle. I have a sample app on <a href="https://github.com/saipraveen-a/test-bottle-app" rel="nofollow noreferrer">GitHub</a>. The main module app.py (in the Application folder) looks like below</p>
  <pre><code>&quot;&quot;&quot;
  This script runs the application using a development server.
  &quot;&quot;&quot;
  
  import bottle
  import os
  import sys
  
  # routes contains the HTTP handlers for our server and must be imported.
  import routes
  
  if '--debug' in sys.argv[1:] or 'SERVER_DEBUG' in os.environ:
      # Debug mode will enable more verbose output in the console window.
      # It must be set at the beginning of the script.
      bottle.debug(True)
  
  def wsgi_app():
      &quot;&quot;&quot;Returns the application to make available through wfastcgi. This is used
      when the site is published to Microsoft Azure.&quot;&quot;&quot;
      return bottle.default_app()
  
  if __name__ == '__main__':
      PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
      STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static').replace('\\', '/')
      HOST = os.environ.get('SERVER_HOST', 'localhost')
      try:
          PORT = int(os.environ.get('SERVER_PORT', '5555'))
      except ValueError:
          PORT = 5555
  
      @bottle.route('/static/&lt;filepath:path&gt;')
      def server_static(filepath):
          &quot;&quot;&quot;Handler for static files, used with the development server.
          When running under a production server such as IIS or Apache,
          the server should be configured to serve the static files.&quot;&quot;&quot;
          return bottle.static_file(filepath, root=STATIC_ROOT)
  
      # Starts a local test server.
      bottle.run(server='wsgiref', host=HOST, port=PORT)
  </code></pre>
  <p>The requirements.txt file has</p>
  <pre><code>bottle
  gunicorn
  </code></pre>
  <p>as dependencies. I am using Python 3.7.2. After running pip install -r requirements.txt,</p>
  <p>I ran python app.py. The server starts up and I can access the default page without error error</p>
  <p>I tried running the server using gunicorn as below</p>
  <pre><code>gunicorn -w 2 -b 0.0.0.0:8080 app:wsgi_app    
  </code></pre>
  <p>The server starts up fine, but when I access the default page, I get</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/Users/&lt;user&gt;/Codebase/test-bottle/venv/lib/python3.8/site-packages/gunicorn/workers/sync.py&quot;, line 134, in handle
      self.handle_request(listener, req, client, addr)
    File &quot;/Users/&lt;user&gt;/Codebase/test-bottle/venv/lib/python3.8/site-packages/gunicorn/workers/sync.py&quot;, line 175, in handle_request
      respiter = self.wsgi(environ, resp.start_response)
  TypeError: wsgi_app() takes 0 positional arguments but 2 were given
  </code></pre>
  <p>Please let me know what I've done wrong.</p>