gpt4 book ai didi

python - 使用 Django 的 manage.py 命令运行 C​​elery 时,返回一个奇怪的错误

转载 作者:太空宇宙 更新时间:2023-11-03 11:57:20 25 4
gpt4 key购买 nike

当我运行以下命令时,它会产生以下错误:

% 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/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'

这是版本信息:

% 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')

最佳答案

应该很容易修复:只需升级您安装的 django-celery。

关于python - 使用 Django 的 manage.py 命令运行 C​​elery 时,返回一个奇怪的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4020423/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com