0

在 googleapp 引擎上部署我的应用程序时,它会出现此错误,但是当我在本地运行应用程序时,它会运行 finr。这可能是什么原因?

Internal Server 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.1/webapp2.py", line 1536, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 1530, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.1/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.1/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.1/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.1/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/apps/s~getstockform/1.371277061626691909/main.py", line 40, in get
    {'hint': 'Enter a stock symbol below:'})
  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: index.html
4

1 回答 1

1

你有没有机会声明index.html是一个静态文件?如果是这样,不要。由于它是一个模板,它需要作为资源提供。

于 2013-10-30T21:12:46.227 回答