当我尝试运行python /manage.py celeryd -B -l info
我会收到以下错误。
Traceback (most recent call last):
File "/opt/python/ansible_ui/manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/opt/python/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/opt/python/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/python/env/local/lib/python2.7/site-packages/djcelery/management/base.py", line 77, in run_from_argv
return super(CeleryCommand, self).run_from_argv(argv)
File "/opt/python/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 238, in run_from_argv
parser = self.create_parser(argv[0], argv[1])
File "/opt/python/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 219, in create_parser
option_list=self.option_list)
File "/opt/python/env/local/lib/python2.7/site-packages/djcelery/management/base.py", line 107, in option_list
if x._long_opts[0] not in self.skip_opts]
IndexError: list index out of range
这里出了什么问题?
答案 0 :(得分:1)
celery
,django-celery
和django
版本之间很可能存在一些问题。使用django-celery
时出现同样错误的旧ticket of 2013-11-13。
尝试更新这些软件包或“玩”所需软件包的版本。如果这样做无效,请使用计算机上安装的软件包版本或virtualenv
执行pip freeze
更新您的问题。