Celery 报错 Windows 平台:ValueError: not enough values to unpack (expected 3, got 0)

By 刘志军 , 2019-05-06, 分类: qa

celery

在Windows平台Celery运行的时候报错:ValueError: not enough values to unpack

[2019-05-06 09:50:10,365: ERROR/MainProcess] Task handler raised error: ValueError('not enough values to unpack (expected 3, got 0)')
Traceback (most recent call last):
  File "c:\users\lzjun\.virtualenvs\weihub-flask-j3runhkh\lib\site-packages\billiard\pool.py", line 358, in workloop
    result = (True, prepare_result(fun(*args, **kwargs)))
  File "c:\users\lzjun\.virtualenvs\weihub-flask-j3runhkh\lib\site-packages\celery\app\trace.py", line 544, in _fast_trace_task
    tasks, accept, hostname = _loc
ValueError: not enough values to unpack (expected 3, got 0)

Celery 的 版本是4.3.0,解决的方法是启动celery的时候添加参数 --pool=solo

celery -A your_app_name worker --pool=solo -l info

关注公众号「Python之禅」,回复「1024」免费获取Python资源

python之禅

猜你喜欢

2018-09-28
Celery 快速入门