使用 django-nonrel 将 django-testapp 部署到 app-engine 时出现 500 错误

发布于 2024-08-22 12:02:38 字数 5612 浏览 6 评论 0原文

我正在尝试在应用程序上启动并运行 django-testapp 引擎。我已经让它在我的开发环境中运行良好, 但当我将其部署到应用程序引擎时,我收到 500 服务器错误。

这就是我正在做的:

Per http://www.allbuttonspressed.com/blog/django/2010/01/Native-Django-on-App-Engine#disqus_thread

   hg clone http://bitbucket.org/wkornewald/djangoappengine/
   hg clone http://bitbucket.org/wkornewald/django-testapp/
   hg clone http://bitbucket.org/wkornewald/django-nonrel/
   cd django-testapp/common-apps
   ln -s ../../djangoappengine
   ln -s ../../django-nonrel/django

然后编辑app.yaml以更改应用程序id,并转换index.yaml 到 Unix 行结尾 http://groups.google.com/group/django-non-relational/browse_thread/thread/435af89b8ceb60dc/36769ee4cff2c337?lnk=gst&q=index.yaml#36769ee4cff2c337

然后我使用了“python2.5管理。 py runserver”(根据 http://code.google.com/p/googleappengine/issues/详细信息?id=1446)和 得到了“成功了!”页。

然后我做了“python2.5管理.py部署”。这是我最近的输出 运行此命令:

Application: xxx; version: 1.
Server: appengine.google.com.
Scanning files on local disk.
Scanned 500 files.
Scanned 1000 files.
Initiating update.
Cloning 75 static files.
Cloning 1190 application files.
Cloned 100 files.
Cloned 200 files.
Cloned 300 files.
Cloned 400 files.
Cloned 500 files.
Cloned 600 files.
Cloned 700 files.
Cloned 800 files.
Cloned 900 files.
Cloned 1000 files.
Cloned 1100 files.
Deploying new version.
Checking if new version is ready to serve.
Will check again in 1 seconds.
Checking if new version is ready to serve.
Will check again in 2 seconds.
Checking if new version is ready to serve.
Will check again in 4 seconds.
Checking if new version is ready to serve.
Closing update: new version is ready to start serving.
Uploading index definitions.
Uploading cron entries.
2010-02-20 19:32:52,527 WARNING datastore_file_stub.py:623 Could not
read datastore data from /var/folders/VO/VO12Voe8HAm0b5OtzkzBmk+++TQ/-
Tmp-/django_xxx.datastore
Running syncdb.

但是当我尝试访问应用程序网址时,我收到一堆 500 错误:

02-20 05:33PM 23.710 / 500 992ms 1466cpu_ms 0kb Mozilla/5.0
(Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML,
like Gecko) Chrome/5.0.307.9 Safari/532.9,gzip(gfe)
75.211.119.241 - - [20/Feb/2010:17:33:24 -0800] "GET / HTTP/1.1" 500 0
- "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US)
AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.9 Safari/
532.9,gzip(gfe)" "xxx.appspot.com"
E 02-20 05:33PM 24.692
Exception in request:
Traceback (most recent call last):
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/core/handlers/base.py", line 128, in get_response
   return callback(request, **param_dict)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/views/defaults.py", line 13, in page_not_found
   t = loader.get_template(template_name) # You need to create a
404.html template.
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/template/loader.py", line 144, in get_template
   template, origin = find_template(template_name)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/template/loader.py", line 125, in find_template
   raise TemplateDoesNotExist(name)
TemplateDoesNotExist: 404.html
E 02-20 05:33PM 24.697
<class 'django.template.TemplateDoesNotExist'>: 500.html
Traceback (most recent call last):
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
djangoappengine/main/main.py", line 86, in <module>
   main()
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
djangoappengine/main/main.py", line 45, in real_main
   util.run_wsgi_app(application)
 File "/base/python_lib/versions/1/google/appengine/ext/webapp/
util.py", line 97, in run_wsgi_app
   run_bare_wsgi_app(add_wsgi_middleware(application))
 File "/base/python_lib/versions/1/google/appengine/ext/webapp/
util.py", line 115, in run_bare_wsgi_app
   result = application(env, _start_response)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/core/handlers/wsgi.py", line 241, in __call__
   response = self.get_response(request)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/core/handlers/base.py", line 131, in get_response
   return self.handle_uncaught_exception(request, resolver,
sys.exc_info())
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/core/handlers/base.py", line 179, in handle_uncaught_exception
   return callback(request, **param_dict)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/views/defaults.py", line 23, in server_error
   t = loader.get_template(template_name) # You need to create a
500.html template.
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/template/loader.py", line 144, in get_template
   template, origin = find_template(template_name)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/template/loader.py", line 125, in find_template
   raise TemplateDoesNotExist(name)

我正在使用 App Engine 1.3.1.654(Mac 上的 GoogleAppEngineLauncher.app) OS X 10.6.2)和 django-testapp 45:9d23e5b235cf(日期为 2 月 18 日星期四), django-nonrel 1fbce9199a32 和 djangoappengine 3a45a7f6ee87。

我是否遗漏了任何地方?

I'm trying to get up and running with the django-testapp on app
engine. I've gotten it working fine in my development environment,
but I'm getting 500 server errors when I deploy it to app engine.

Here's what I'm doing:

Per http://www.allbuttonspressed.com/blog/django/2010/01/Native-Django-on-App-Engine#disqus_thread

   hg clone http://bitbucket.org/wkornewald/djangoappengine/
   hg clone http://bitbucket.org/wkornewald/django-testapp/
   hg clone http://bitbucket.org/wkornewald/django-nonrel/
   cd django-testapp/common-apps
   ln -s ../../djangoappengine
   ln -s ../../django-nonrel/django

Then editing app.yaml to change the app id, and converting index.yaml
to unix line endings as per
http://groups.google.com/group/django-non-relational/browse_thread/thread/435af89b8ceb60dc/36769ee4cff2c337?lnk=gst&q=index.yaml#36769ee4cff2c337

Then I used "python2.5 manage.py runserver" (as per
http://code.google.com/p/googleappengine/issues/detail?id=1446) and
got the "It worked!" page.

Then I did "python2.5 manage.py deploy". Here's my most recent output
from running this command:

Application: xxx; version: 1.
Server: appengine.google.com.
Scanning files on local disk.
Scanned 500 files.
Scanned 1000 files.
Initiating update.
Cloning 75 static files.
Cloning 1190 application files.
Cloned 100 files.
Cloned 200 files.
Cloned 300 files.
Cloned 400 files.
Cloned 500 files.
Cloned 600 files.
Cloned 700 files.
Cloned 800 files.
Cloned 900 files.
Cloned 1000 files.
Cloned 1100 files.
Deploying new version.
Checking if new version is ready to serve.
Will check again in 1 seconds.
Checking if new version is ready to serve.
Will check again in 2 seconds.
Checking if new version is ready to serve.
Will check again in 4 seconds.
Checking if new version is ready to serve.
Closing update: new version is ready to start serving.
Uploading index definitions.
Uploading cron entries.
2010-02-20 19:32:52,527 WARNING datastore_file_stub.py:623 Could not
read datastore data from /var/folders/VO/VO12Voe8HAm0b5OtzkzBmk+++TQ/-
Tmp-/django_xxx.datastore
Running syncdb.

But when I try to visit the app url, I get a bunch of 500 errors:

02-20 05:33PM 23.710 / 500 992ms 1466cpu_ms 0kb Mozilla/5.0
(Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML,
like Gecko) Chrome/5.0.307.9 Safari/532.9,gzip(gfe)
75.211.119.241 - - [20/Feb/2010:17:33:24 -0800] "GET / HTTP/1.1" 500 0
- "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US)
AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.9 Safari/
532.9,gzip(gfe)" "xxx.appspot.com"
E 02-20 05:33PM 24.692
Exception in request:
Traceback (most recent call last):
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/core/handlers/base.py", line 128, in get_response
   return callback(request, **param_dict)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/views/defaults.py", line 13, in page_not_found
   t = loader.get_template(template_name) # You need to create a
404.html template.
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/template/loader.py", line 144, in get_template
   template, origin = find_template(template_name)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/template/loader.py", line 125, in find_template
   raise TemplateDoesNotExist(name)
TemplateDoesNotExist: 404.html
E 02-20 05:33PM 24.697
<class 'django.template.TemplateDoesNotExist'>: 500.html
Traceback (most recent call last):
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
djangoappengine/main/main.py", line 86, in <module>
   main()
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
djangoappengine/main/main.py", line 45, in real_main
   util.run_wsgi_app(application)
 File "/base/python_lib/versions/1/google/appengine/ext/webapp/
util.py", line 97, in run_wsgi_app
   run_bare_wsgi_app(add_wsgi_middleware(application))
 File "/base/python_lib/versions/1/google/appengine/ext/webapp/
util.py", line 115, in run_bare_wsgi_app
   result = application(env, _start_response)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/core/handlers/wsgi.py", line 241, in __call__
   response = self.get_response(request)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/core/handlers/base.py", line 131, in get_response
   return self.handle_uncaught_exception(request, resolver,
sys.exc_info())
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/core/handlers/base.py", line 179, in handle_uncaught_exception
   return callback(request, **param_dict)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/views/defaults.py", line 23, in server_error
   t = loader.get_template(template_name) # You need to create a
500.html template.
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/template/loader.py", line 144, in get_template
   template, origin = find_template(template_name)
 File "/base/data/home/apps/xxx/1.340031474735303921/common-apps/
django/template/loader.py", line 125, in find_template
   raise TemplateDoesNotExist(name)

I'm using App Engine 1.3.1.654 on (GoogleAppEngineLauncher.app on Mac
OS X 10.6.2) and django-testapp 45:9d23e5b235cf (dated Thurs Feb 18),
django-nonrel 1fbce9199a32, and djangoappengine 3a45a7f6ee87.

Am I missing a step anywhere?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

捶死心动 2024-08-29 12:02:38

这个问题似乎只是期望之一。如果我使用 startapp 创建一个简单的应用程序并根据 django 1.1 说明将其连接起来,那么当我将其部署到应用程序引擎时,一切正常。

所以 500 服务器错误实际上只是一个转移注意力的事情。

The problem seemed to be just one of expectations. If I create a simple application using startapp and wire it up according to the django 1.1 instructions, when I deploy it to app-engine everything works fine.

So the 500 server error was actually just a red herring.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文