sahar
sahar

Reputation: 17

djangocms KeyError: u'__module__'

Running djangocms according to this details: doc.django-cms in do all the details and when i want tu run the djangocms i got KeyError: u'__module__' error

The result of pip freeze is:

cffi==1.6.0
cryptography==1.3.2
dj-database-url==0.4.1
Django==1.6
django-classy-tags==0.7.2
django-cms==3.2.5
django-formtools==1.0
django-i18nurls==0.7
django-mptt==0.8.4
django-sekizai==0.9.0
django-treebeard==4.0.1
djangocms-admin-style==1.1.1
djangocms-installer==0.8.8
enum34==1.1.2
html5lib==0.9999999
idna==2.1
ipaddress==1.0.16
louis==2.6.5
MySQL-python==1.2.5
netsnmp-python==1.0a1
numpy==1.11.0
packaging==16.7
paramiko==2.0.0
pexpect==4.0.1
ply==3.8
ptyprocess==0.5.1
pwquality==1.3.0
pyasn1==0.1.9
pycparser==2.14
pycrypto==2.6.1
pygobject==3.20.0
pyparsing==2.1.4
pytz==2016.4
six==1.10.0
South==1.0.2
team==1.0
Terminator==0.98
Twisted==16.1.1
tzlocal==1.2.2
zope.interface==4.1.3

error:

Validating models...

Unhandled exception in thread started by <function wrapper at 0xb66ed33c>
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/djang/util/autoreload.py",      
line 93, in wrapper
   fn(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/core/management/command/runserver.py", line 98, in inner_run
    self.validate(display_num_errors=True)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 310, in validate
num_errors = get_validation_errors(s, app)
  File "/usr/lib/python2.7/site-packages/django/core/management/validation.py", line 34, in get_validation_errors
for (app_name, error) in get_app_errors().items():
  File "/usr/lib/python2.7/site-packages/django/db/models/loading.py", line 196, in get_app_errors
self._populate()
  File "/usr/lib/python2.7/site-packages/django/db/models/loading.py", line 75, in _populate
self.load_app(app_name, True)
  File "/usr/lib/python2.7/site-packages/django/db/models/loading.py", line 99, in load_app
models = import_module('%s.models' % app_name)
  File "/usr/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
  File "/usr/lib/python2.7/site-packages/cms/models/__init__.py", line 3, in <module>
from .pagemodel import *  # nopyflakes
  File "/usr/lib/python2.7/site-packages/cms/models/pagemodel.py", line 35, in <module>
class Page(six.with_metaclass(PageMetaClass, MP_Node)):
  File "/usr/lib/python2.7/site-packages/django/utils/six.py", line 566, in with_metaclass
return meta("NewBase", bases, {})
  File "/usr/lib/python2.7/site-packages/cms/models/metaclasses.py", line 17, in __new__
return super_new(cls, name, bases, attrs)
  File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 78, in __new__
module = attrs.pop('__module__')
KeyError: u'__module__'

i upgrade the six app and decrease the version of django to 1.6 how can i fix this?

Upvotes: 1

Views: 586

Answers (1)

Alasdair
Alasdair

Reputation: 308899

The docs you linked to say it requires Django 1.6.9 or later, so you need to upgrade. The final release of 1.6.X was 1.6.11:

pip install django==1.6.11

Django 1.6.X is no longer supported so does not receive security fixes. You should upgrade your application to a supported version as soon as possible. The current Long Term Support release is 1.8.X.

Upvotes: 1

Related Questions