title: GAE, Python - module 'main' has no attribute application
body: <p>I'm following the second chapter in "Google App Engine With Python" and I've copied the code exactly like it is in the book, but I get a blank page when I try to open it now and it's giving me the following error:</p>
  
  <pre><code>ImportError: &lt;module 'main' from '...../clock/main.pyc'&gt; has no attribute application
  </code></pre>
  
  <p>I noticed it says main.pyc at the end there, it should be using main.py. Is this some kind of automatically generated file?</p>
  
  <p>app.yaml</p>
  
  <pre><code>application: clock
  version: 1
  runtime: python27
  api_version: 1
  threadsafe: yes
  
  handlers:
  - url: .*
    script: main.application
  
  libraries:
  - name: webapp2
    version: "2.5.2"
  - name: jinja2
    version: "2.9.6"
  - name: markupsafe
    version: "0.15"
  </code></pre>
  
  <p>main.py</p>
  
  <pre><code>import datetime
  import jinja2
  import os
  import webapp2
  
  from google.appengine.api import users
  
  template_env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.getcwd()))
  
  class MainPage(webapp2.RequestHandler):
    def get(self):
      current_time = datetime.datetime.now()
      user = users.get_current_user()
      login_url = users.create_login_url(self.request.path)
      logout_url = users.create_logout_url(self.request.path)
  
      template = template_env.get_template('home.html')
      context = {
          'current_time': current_time,
          'user': user,
          'login_url': login_url,
          'logout_url': logout_url,
      }
      self.response.out.write(template.render(context))
  
      application = webapp2.WSGIApplication([('/', MainPage)], debug=True)
  </code></pre>
  
  <p>Appreciate any help.</p>