本文介绍了无法启动celeryd - 错误:冲突的选项字符串:--no-color的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是django v1.7.0b4和celery v3.1.1。按照执行的步骤。但是我被卡住了以下错误。

  $ ./manage.py celeryd --help 
启动服务器在开发模式
追溯(最近的最后一次调用):
文件./manage.py,第10行在< module>
execute_from_command_line(sys.argv)
文件/Library/Python/2.7/site-packages/django/core/management/__init__.py,第427行,在execute_from_command_line
utility.execute ()
文件/Library/Python/2.7/site-packages/django/core/management/__init__.py,第419行,执行
self.fetch_command(子命令).run_from_argv(self。 argv)
文件/Library/Python/2.7/site-packages/django_celery-3.1.10-py2.7.egg/djcelery/management/base.py,第77行,在run_from_argv
返回super(CeleryCommand,self).run_from_argv(argv)
文件/Library/Python/2.7/site-packages/django/core/management/base.py,第284行,在run_from_argv
parser = self.create_parser(argv [0],argv [1])$ ​​b $ b文件/Library/Python/2.7/site-packages/django/core/management/base.py,第265行,在create_parser
option_list = self.option_list)
文件/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py,第1214行,__init__
add_help = add_help_op )
文件/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py,第1256行,在_populate_option_list
self.add_options(option_list)
文件/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py,第1039行,add_options
self.add_option(选项)
文件/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py,第1020行,add_option
self._check_conflict(选项)
文件/系统/库/框架/ Python.framework / Versions / 2.7 / lib / python2.7 / optparse.py,第995行,在_check_conflict
选项中)
optparse.OptionConflictError:option -C / no-color:冲突的选项字符串:--no-color

同样的问题?



编辑:



在django v1.6.5中工作得很好。 $ b

解决方案

您应该使用 ./ manage.py celery worker 而不是 。/嘛nage.py celeryd



使用时看起来有一个错误:

  django == 1.7b4 
celery == 3.1.11
django-celery == 3.1.10

几个提示可以帮助您避免此问题:




  • 当您正在开始玩项目,远离beta版本,使用稳定版本。

  • 不要使用不推荐使用的方法: ./ manage.py celeryd 是旧的不推荐的别名 ./管理芹菜工作者


I'm using django v1.7.0b4 and celery v3.1.1. Followed steps according to the django installation guide. But I'm stuck with the below error.

$ ./manage.py celeryd --help
Starting server in DEVELOPMENT Mode
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 427, in     execute_from_command_line
utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 419, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.7/site-packages/django_celery-3.1.10-py2.7.egg/djcelery/management/base.py", line 77, in run_from_argv
return super(CeleryCommand, self).run_from_argv(argv)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 284, in run_from_argv
parser = self.create_parser(argv[0], argv[1])
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 265, in create_parser
option_list=self.option_list)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1214, in __init__
add_help=add_help_option)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1256, in _populate_option_list
self.add_options(option_list)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1039, in add_options
self.add_option(option)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1020, in add_option
self._check_conflict(option)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 995, in _check_conflict
option)
optparse.OptionConflictError: option -C/--no-color: conflicting option string(s): --no-color

Is any one else facing the same issue ?

Edited :

Working good in django v1.6.5.

解决方案

You should use ./manage.py celery worker instead of ./manage.py celeryd

Looks like there is an bug when you use:

django==1.7b4
celery==3.1.11
django-celery==3.1.10

Few tips which will help you avoid this issues:

  • When you are starting playing with a project stay away from beta releases, use stable release.
  • Don't use deprecated methods: ./manage.py celeryd is old deprecated alias for ./manage celery worker

这篇关于无法启动celeryd - 错误:冲突的选项字符串:--no-color的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 15:32