开发者

When running Celery with Django's manage.py command, it returns a strange error

When I run the following command, it produces the following error:

% python manage.py celeryd -l INFO                                                                                                     ~/Workspace/django-projects/project/src
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/damon/Workspace/django-projects/project/env/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/damon/Workspace/django-projects/project/env/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/damon/Workspace/django-projects/project/env/lib/python2.6/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/home/damon/Workspace/django-projects/project/env/lib/python2.6/site-packages/django/core/management/__init__.py", line 67, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/home/damon/Workspace/django-projects/project/env/lib/python2.6/site-packages开发者_如何学Python/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/damon/Workspace/django-projects/project/env/lib/python2.6/site-packages/djcelery/management/commands/celeryd.py", line 13, in <module>
    class Command(CeleryCommand):
  File "/home/damon/Workspace/django-projects/project/env/lib/python2.6/site-packages/djcelery/management/commands/celeryd.py", line 17, in Command
    option_list = CeleryCommand.option_list + worker.get_options()
  File "/home/damon/Workspace/django-projects/project/env/lib/python2.6/site-packages/celery/bin/celeryd.py", line 89, in get_options
    conf = self.app.conf
AttributeError: 'NoneType' object has no attribute 'conf'

Here's the version information:

% python                                                                                                                               ~/Workspace/django-projects/project/src
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import celery
>>> print celery.VERSION
(2, 2, 0, 'a1')
>>> import djcelery
>>> print djcelery.VERSION
(2, 2, 0, 'a1')


Should be easy to fix: just upgrade your install of django-celery.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜