I installed django-scheduler with pip (https://github.com/llazzaro/django-scheduler) and I edited settings.py as in the tutorial. When I run $python manage.py runserver I got this:
python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/dist-packages/django_scheduler-0.7.5-py2.7.egg/schedule/models/__init__.py", line 1, in <module>
from schedule.models.calendars import *
File "/usr/local/lib/python2.7/dist-packages/django_scheduler-0.7.5-py2.7.egg/schedule/models/calendars.py", line 110, in <module>
class Calendar(with_metaclass(ModelBase, *get_model_bases())):
File "/usr/lib/python2.7/dist-packages/six.py", line 617, in with_metaclass
return meta("NewBase", bases, {})
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 71, in __new__
module = attrs.pop('__module__')
KeyError: u'__module__'
I tried to reinstall Python (2.7), Django (1.7) and the app. I need a calendar app to my project and this seems the most complete.
Thanks.
I had this same issue. It turned out to be a problem with the version of python's
six
I had installed. I was usingsix
version1.6.1
, and when I upgraded to version1.9.0
it took care of this error. Run: