Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python manage.py celery worker -c 10 --autoreload 报错,请问您有没有遇到过呢? #2

Closed
dotbalo opened this issue Aug 14, 2018 · 2 comments

Comments

@dotbalo
Copy link

dotbalo commented Aug 14, 2018

报错如下:
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/root/demo/local/lib/python2.7/site-packages/django/core/management/init.py", line 338, in execute_from_command_line
utility.execute()
File "/root/demo/local/lib/python2.7/site-packages/django/core/management/init.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/root/demo/local/lib/python2.7/site-packages/django/core/management/init.py", line 190, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/root/demo/local/lib/python2.7/site-packages/django/core/management/init.py", line 40, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/root/demo/local/lib/python2.7/site-packages/djcelery/management/commands/celery.py", line 11, in
class Command(CeleryCommand):
File "/root/demo/local/lib/python2.7/site-packages/djcelery/management/commands/celery.py", line 14, in Command
options = (CeleryCommand.options + base.get_options() + base.preload_options)
TypeError: can only concatenate tuple (not "NoneType") to tuple

——————————————————————————————————————————
pip list如下:
(demo) root@AnsibleWebUI:/opt/test/ansibleWebUI/ansible_demo# pip list
Package Version


amqp 2.3.2
ansible 1.9.4
anyjson 0.3.3
asn1crypto 0.24.0
bcrypt 3.1.4
billiard 3.5.0.4
celery 4.2.1
cffi 1.11.5
cryptography 2.2.2
Django 1.8
django-celery 3.2.2
django-filter 0.13.0
django-redis 4.9.0
djangorestframework 3.2.3
enum34 1.1.6
idna 2.7
ipaddress 1.0.22
Jinja2 2.10
kombu 4.2.1
MarkupSafe 1.0
MySQL-python 1.2.5
paramiko 2.4.1
pip 18.0
pkg-resources 0.0.0
pyasn1 0.4.3
pycparser 2.18
pycrypto 2.6.1
PyNaCl 1.2.1
pytz 2018.5
PyYAML 3.13
redis 2.10.6
setuptools 40.0.0
six 1.11.0
vine 1.1.4
wheel 0.31.1

@dotbalo
Copy link
Author

dotbalo commented Aug 14, 2018

排查之后发现是版本的问题,安装如下即可解决
django-celery 3.1.17
celery 3.1.25
celery-with-redis 3.0

@targetoyes
Copy link
Collaborator

对的,软件的版本问题确实很头痛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants