django celery 启动报错TypeError: can only concatenate tuple (not "NoneType") to tuple解决方法

手贱不小心

pip install django-celery-result

结果没想到把django-celery什么的也给更新了,会提示不兼容:
在这里插入图片描述
再使用

python manage.py celery worker --loglevel=info 

的时候就启动不了,部分报错如下:

File "/anaconda3/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/anaconda3/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/anaconda3/lib/python3.6/site-packages/django/core/management/__init__.py", line 224, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/anaconda3/lib/python3.6/site-packages/django/core/management/__init__.py", line 36, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/anaconda3/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in _call_with_frames_removed
  File "/anaconda3/lib/python3.6/site-packages/djcelery/management/commands/celery.py", line 11, in 
    class Command(CeleryCommand):
  File "/anaconda3/lib/python3.6/site-packages/djcelery/management/commands/celery.py", line 15, in Command
    base.get_options() +
TypeError: can only concatenate tuple (not "NoneType") to tuple

不用纠结什么,就是版本不兼容的问题,把django-celery降级到3.X就行了,哪个模块出现了不兼容的提示就降级哪个模块。

你可能感兴趣的:(python,django)