KeyError:你'__ module __'

时间:2016-04-02 06:18:30

标签: python django

运行Django 1.6会产生错误:KeyError:你'模块'

使用Django 1.5.10,错误是:来自django.db.models.loading import get_app_paths,get_apps ImportError:无法导入名称get_app_paths

我该如何解决这个问题?

   File "/home/ubuntu/.virtualenvs/o25/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
   File "/home/ubuntu/.virtualenvs/o25/local/lib/python2.7/site-packages/djangocms_text_ckeditor/models.py", line 14, in <module>
from cms.models import CMSPlugin
   File "/home/ubuntu/.virtualenvs/o25/local/lib/python2.7/site-packages/cms/models/__init__.py", line 3, in <module>
from .pagemodel import *  # nopyflakes
   File "/home/ubuntu/.virtualenvs/o25/local/lib/python2.7/site-packages/cms/models/pagemodel.py", line 35, in <module>
class Page(six.with_metaclass(PageMetaClass, MP_Node)):
   File "/home/ubuntu/.virtualenvs/o25/local/lib/python2.7/site-packages/django/utils/six.py", line 566, in with_metaclass
return meta("NewBase", bases, {})
   File "/home/ubuntu/.virtualenvs/o25/local/lib/python2.7/site-packages/cms/models/metaclasses.py", line 17, in __new__
return super_new(cls, name, bases, attrs)
   File "/home/ubuntu/.virtualenvs/o25/local/lib/python2.7/site-packages/django/db/models/base.py", line 78, in __new__
module = attrs.pop('__module__')
  KeyError: u'__module__'

0 个答案:

没有答案