title: TemplateNotFound: index.html with Google App Engine & Jinja2
body: <p>I'm trying to build my first GAE app with jinja2. After overcoming a dozen small errors, now I'm stuck with this:</p>
  
  <p>Traceback (most recent call last):</p>
  
  <pre><code>File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1536, in __call__
      rv = self.handle_exception(request, response, e)
    File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1530, in __call__
      rv = self.router.dispatch(request, response)
    File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1278, in default_dispatcher
      return route.handler_adapter(request, response)
    File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1102, in __call__
      return handler.dispatch()
    File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 572, in dispatch
      return self.handle_exception(e, self.app.debug)
    File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 570, in dispatch
      return method(*args, **kwargs)
    File "C:\Users\CG\Documents\udacity\HiMon\main.py", line 31, in get
      template = jinja_environment.get_template('index.html')
    File "C:\Program Files (x86)\Google\google_appengine\lib\jinja2\jinja2\environment.py", line 719, in get_template
      return self._load_template(name, self.make_globals(globals))
    File "C:\Program Files (x86)\Google\google_appengine\lib\jinja2\jinja2\environment.py", line 693, in _load_template
      template = self.loader.load(self, name, globals)
    File "C:\Program Files (x86)\Google\google_appengine\lib\jinja2\jinja2\loaders.py", line 115, in load
      source, filename, uptodate = self.get_source(environment, name)
    File "C:\Program Files (x86)\Google\google_appengine\lib\jinja2\jinja2\loaders.py", line 180, in get_source
      raise TemplateNotFound(template)
  TemplateNotFound: index.html
  </code></pre>
  
  <p>Here my yaml file:</p>
  
  <pre><code>application: himother
  version: 1
  runtime: python27
  api_version: 1
  threadsafe: yes
  
  handlers:
  - url: /favicon\.ico
    static_files: favicon.ico
    upload: favicon\.ico
  
  - url: .*
    script: main.app
  
  libraries:
  - name: webapp2
    version: "2.5.1"
  - name: jinja2
    version: "2.6"
  </code></pre>
  
  <p>Here my code:</p>
  
  <pre><code>import os
  import webapp2
  
  import jinja2
  
  jinja_environment = jinja2.Environment(autoescape=True,
      loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
  
  class MainPage(webapp2.RequestHandler):
      def get(self):
          template_values = {
              'name': 'Serendipo',
              'verb': 'extremely happy'
          }
  
          template = jinja_environment.get_template('index.html')
          self.response.out.write(template.render(template_values))
  
  app = webapp2.WSGIApplication([('/', MainPage)],
                                debug=True)
  </code></pre>
  
  <p>Here my .html template:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Look Ma, I'm using Jinja!&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          Hi there - I'm {{ name }}, and I {{ verb }} programming!
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Despite the error message, I have a folder called "templates" and, within it, created the index.html file:</p>
  
  <p><img src="https://content.screencast.com/users/claudioangelo/folders/Jing/media/bc89a253-d7dd-4eda-a3d2-3c1c00906cee/2012-06-13_0913.png" alt="enter image description here"></p>
  
  <p><img src="https://content.screencast.com/users/claudioangelo/folders/Jing/media/e5c70b86-a2bf-46a9-8143-9a4f988473ee/2012-06-13_0914.png" alt="enter image description here"></p>
  
  <p><img src="https://content.screencast.com/users/claudioangelo/folders/Jing/media/368a102f-bdc7-4e66-b81e-4f02a0695aa1/2012-06-13_0916.png" alt="enter image description here"></p>
  
  <p>I also have installed jinja2. </p>
  
  <p>Does anyone have any idea of the cause of this error now?</p>