python manage.py celery worker -l INFO必报这个错

来源:4-1 Django 中配置使用 Celery

小马_125

2019-06-29 18:18

  File "/Users/podao/venv/celery_imooc/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 "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module

    __import__(name)

  File "/Users/podao/venv/celery_imooc/lib/python2.7/site-packages/djcelery/management/commands/celery.py", line 11, in <module>

    class Command(CeleryCommand):

  File "/Users/podao/venv/celery_imooc/lib/python2.7/site-packages/djcelery/management/commands/celery.py", line 23, in Command

    preload_options)

TypeError: can only concatenate list (not "tuple") to list


写回答 关注

1回答

  • 小马_125
    2019-06-29 18:28:40

    都可以试试这个解决方法:
    找到python安装库的位置,找到该文件 \lib\site-packages\djcelery\management\commands\celery.py。在文件中注释掉如下代码:

    # options = (cc_options +
    #            base_options +
    #            preload_options)


Python 异步任务队列 Celery 使用

Python 异步任务队列神器 celery 的使用

10849 学习 · 43 问题

查看课程

相似问题