Internal server error while running dev_appserver.py
Question: I am trying to upload my Unity Web Player app to Google App Engine but when i
start the server using dev_appserver.py I am getting a Internal server error
while browsing the Localhost page The error The server has either erred or is
incapable of performing the requested operation

    
    
    Traceback (most recent call last):
      File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
        rv = self.handle_exception(request, response, e)
      File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
        rv = self.router.dispatch(request, response)
      File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
        return route.handler_adapter(request, response)
      File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
        return handler.dispatch()
      File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
        return self.handle_exception(e, self.app.debug)
      File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
        return method(*args, **kwargs)
      File "/base/data/home/apps/s~gcdc2013-space3d/1.371793060412129756/main.py", line 27, in get
        self.response.out.write(template.render(path, template_values))
      File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/webapp/template.py", line 89, in render
        t = _load_internal_django(template_path, debug)
      File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/webapp/template.py", line 163, in _load_internal_django
        template = django.template.loader.get_template(file_name)
      File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/_internal/django/template/loader.py", line 157, in get_template
        template, origin = find_template(template_name)
      File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/_internal/django/template/loader.py", line 138, in find_template
        raise TemplateDoesNotExist(name)
    TemplateDoesNotExist: WebPlayer.html   
    

My app.yaml content

    
    
    application: gcdc2013-space3d
    version: 1
    runtime: python27
    api_version: 1
    threadsafe: yes
    
    handlers:
    - url: /favicon\.ico
      static_files: favicon.ico
      upload: favicon\.ico
    
    - url: /WebPlayer\.unity3d
      static_files: WebPlayer/WebPlayer.unity3d
      upload: WebPlayer/WebPlayer\.unity3d
    
    - url: .*
      script: main.app
    
    libraries:
    - name: webapp2
      version: "2.5.2"
    

main.py content

    
    
    from google.appengine.ext.webapp import template
    import webapp2
    import os
    
    class MainHandler(webapp2.RequestHandler):
        def get(self):
             template_values = {
                'greetings': 'greetings',
                }
             path = os.path.join('WebPlayer', 'WebPlayer.html')
             self.response.out.write(template.render(path, template_values))
    
    app = webapp2.WSGIApplication([
        ('/', MainHandler)
    ], debug=True)
    

any help will be appreciated


Answer: It's probably because Google datastore indexes haven't updated in time. Wait a
little while after deploying, and it should work.

See here: <http://stackoverflow.com/a/21965590/2137369>

