1

从本地服务器跟踪:

Traceback (most recent call last):
  File "/Users/pk/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 266, in Handle
    result = handler(dict(self._environ), self._StartResponse)
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/zip-packages/django.zip/django/core/handlers/wsgi.py", line 219, in __call__
    self.load_middleware()
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/zip-packages/django.zip/django/core/handlers/base.py", line 45, in load_middleware
    mod = import_module(mw_module)
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/zip-packages/django.zip/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Users/pk/Desktop/Lkos_hrd/los/src/website/middleware.py", line 1, in <module>
    from website.models import Preference, Person
  File "/Users/pk/Desktop/Lkos_hrd/los/src/website/models.py", line 7, in <module>
    from logic.persongroup import *
  File "/Users/pk/Desktop/Lkos_hrd/los/src/logic/persongroup.py", line 10, in <module>
    class PersonGroup(db.Model):
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/appenginepatch/appenginepatcher/patch.py", line 549, in __init__
    signals.class_prepared.send(sender=cls)
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/zip-packages/django.zip/django/dispatch/dispatcher.py", line 172, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/zip-packages/django.zip/django/db/models/manager.py", line 36, in ensure_default_manager
    for base_class in default_mgr.mro()[1:]:
TypeError: Error when calling the metaclass bases
    descriptor 'mro' of 'type' object needs an argument

升级到谷歌应用引擎高分辨率和 python 2.7 并遇到了这个问题。作为测试,我从 'google.appengine.ext import db' 更改为 'from google.appengine.ext import ndb' 并且还将例如 class person(db.model) 更新为 class person(ndb.model)

然后该死的东西开始越过这个错误,但我必须更改每个模型和属性以移动到 ndb 以使整个事情正常工作。就好像它根本不识别旧的 db API,所以我猜我错过了一些东西。

4

1 回答 1

0

您几乎只能靠自己尝试让 Google App Engine Launcher + Django 1.4 正常工作。HRD 的开发已经转移到 Django-nonrel。

https://django-nonrel.readthedocs.org/en/latest/

于 2013-09-13T19:35:47.720 回答