ask/django-celery — Issue #109: Module error when upgrading to 2.5.0
Author: bjornlilja
Created: 2012-02-27 09:33:51+00:00
State: open

After upgrading celery to 2.5 (works fine!) and then django-celery to 2.5.0 we get a module error:
'module' object has no attribute 'DjangoLoader'

Full stack trace:

Traceback (most recent call last):
File "./manage.py", line 15, in
execute_manager(settings)
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 67, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Library/Python/2.7/site-packages/djcelery/management/commands/celeryd.py", line 16, in
class Command(CeleryCommand):
File "/Library/Python/2.7/site-packages/djcelery/management/commands/celeryd.py", line 22, in Command
+ worker.preload_options)
File "/Library/Python/2.7/site-packages/celery/bin/celeryd.py", line 104, in get_options
conf = self.app.conf
File "/Library/Python/2.7/site-packages/kombu/utils/__init__.py", line 229, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "/Library/Python/2.7/site-packages/celery/app/base.py", line 365, in conf
return self._get_config()
File "/Library/Python/2.7/site-packages/celery/app/base.py", line 319, in _get_config
return Settings({}, [self.prepare_config(self.loader.conf),
File "/Library/Python/2.7/site-packages/kombu/utils/__init__.py", line 229, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "/Library/Python/2.7/site-packages/celery/app/base.py", line 382, in loader
return get_loader_cls(self.loader_cls)(app=self)
File "/Library/Python/2.7/site-packages/celery/loaders/__init__.py", line 25, in get_loader_cls
return get_cls_by_name(loader, LOADER_ALIASES)
File "/Library/Python/2.7/site-packages/celery/utils/__init__.py", line 289, in get_cls_by_name
module = imp(module_name, package=package, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Library/Python/2.7/site-packages/djcelery/loaders.py", line 16, in
from .utils import DATABASE_ERRORS, now
File "/Library/Python/2.7/site-packages/djcelery/utils.py", line 37, in
JUST_NOW = _("just now")
File "/Library/Python/2.7/site-packages/django/utils/translation/__init__.py", line 81, in ugettext
return _trans.ugettext(message)
File "/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py", line 286, in ugettext
return do_translate(message, 'ugettext')
File "/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py", line 276, in do_translate
_default = translation(settings.LANGUAGE_CODE)
File "/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py", line 185, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py", line 162, in _fetch
app = import_module(appname)
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Users/bjornlilja/kundo/richmedia/__init__.py", line 1, in
from richmedia.signals import *
File "/Users/bjornlilja/kundo/richmedia/signals.py", line 3, in
from dialog.models import Dialog, Comment
File "/Users/bjornlilja/kundo/dialog/__init__.py", line 1, in
from dialog.signals import *
File "/Users/bjornlilja/kundo/dialog/signals.py", line 7, in
from search.tasks import index_dialog, delete_dialog
File "/Users/bjornlilja/kundo/search/tasks.py", line 2, in
from celery.task import task
File "/Library/Python/2.7/site-packages/celery/task/__init__.py", line 17, in
from .base import Task, PeriodicTask # noqa
File "/Library/Python/2.7/site-packages/celery/task/base.py", line 19, in
Task = current_app.Task
File "/Library/Python/2.7/site-packages/celery/local.py", line 84, in __getattr__
return getattr(self._get_current_object(), name)
File "/Library/Python/2.7/site-packages/kombu/utils/__init__.py", line 229, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "/Library/Python/2.7/site-packages/celery/app/__init__.py", line 203, in Task
return self.create_task_cls()
File "/Library/Python/2.7/site-packages/celery/app/__init__.py", line 95, in create_task_cls
conf = self.conf
File "/Library/Python/2.7/site-packages/kombu/utils/__init__.py", line 229, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "/Library/Python/2.7/site-packages/celery/app/base.py", line 365, in conf
return self._get_config()
File "/Library/Python/2.7/site-packages/celery/app/base.py", line 319, in _get_config
return Settings({}, [self.prepare_config(self.loader.conf),
File "/Library/Python/2.7/site-packages/kombu/utils/__init__.py", line 229, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "/Library/Python/2.7/site-packages/celery/app/base.py", line 382, in loader
return get_loader_cls(self.loader_cls)(app=self)
File "/Library/Python/2.7/site-packages/celery/loaders/__init__.py", line 25, in get_loader_cls
return get_cls_by_name(loader, LOADER_ALIASES)
File "/Library/Python/2.7/site-packages/celery/utils/__init__.py", line 293, in get_cls_by_name
return getattr(module, cls_name)
AttributeError: 'module' object has no attribute 'DjangoLoader'