I have djcelery installed and it seems it’s installed properly:
In [1]: from djcelery import models
In [2]: models.PeriodicTask
Out[2]: djcelery.models.PeriodicTask
However, when I access the admin site, I get this error which seems to imply that there’s an issue with djcelery. I suspect it has to do with my setup. The details of the error are below. Anyone seen this or have any thoughts?
AttributeError at /admin/
'module' object has no attribute 'PeriodicTask'
Request Method: GET
Django Version: 1.4
Exception Type: AttributeError
Exception Value:
'module' object has no attribute 'PeriodicTask'
Exception Location: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py in import_module, line 37
Python Version: 2.7.1
It turned out that I was getting this error because of an old tasks.pyc that was in one of my applications (where tasks.py had been removed). Djcelery automatically tries to load tasks.py file in all the installed apps, and this one apparently referenced PeriodicTask incorrectly.