celery 启用worker ValueError: not enough values to unpack

[2018-01-12 19:08:15,545: INFO/MainProcess] Received task: tasks.add[5d387722-5389-441b-9b01-a619b93b4702]
[2018-01-12 19:08:15,550: ERROR/MainProcess] Task handler raised error: ValueError(‘not enough values to unpack (expected 3, got 0)‘,)
Traceback (most recent call last):
File "d:\programmingsoftware\python35\lib\site-packages\billiard\pool.py", line 358, in workloop
result = (True, prepare_result(fun(*args, **kwargs)))
File "d:\programmingsoftware\python35\lib\site-packages\celery\app\trace.py", line 525, in _fast_trace_task
tasks, accept, hostname = _loc
ValueError: not enough values to unpack (expected 3, got 0)
--------------------------------------------------------------------------------------------------------------------------------------------------------------

celery worker -A tasks -l INFO 报错解决办法

1、安装 eventlet

pip install eventlet

2、输入以下命令启用worker

celery -A tasks worker -l INFO -P eventlet

原文地址:https://www.cnblogs.com/GetcharZp/p/11241444.html

时间: 2024-11-13 14:05:45

celery 启用worker ValueError: not enough values to unpack的相关文章

Celery ValueError: not enough values to unpack (expected 3, got 0)的解决方案

最近因项目需要,在使用任务队列Celery的时候,出现如题错误,最终在github上里找到解决办法,记录一下. 运行环境环境:win10 + python3 + redis 2.10.6 + celery 4.2.1 win10上运行celery4.x会出现这个问题,开启任务队列一切正常(显示ready提示),一旦接受任务,就报ValueError: not enough values to unpack (expected 3, got 0)错误,解决办法如下: 1.先安装一个扩展 event

Python: ValueError: too many values to unpack

eg1: >>>a,b=(1,2,3) Traceback (most recent call last): File "<stdin>",line 1,in <module> ValueError: too many values to unpack (expected 2) 错误原因: 一个tuple值赋给一个tuple变量时,变量个数不够造成的 可以改成 a,b,c=(1,2,3)或者其他变量即可 eg2: >>>imp

ValueError: too many values to unpack

Error msg: 执行: python manage,py makemigrations 报错:Value: too many values to unpack 问题: django第一次数据库迁移之后, apps中的model位置改变了, 导致之前生成的迁移文件检测不到原来的位置 解决: 删除所有的迁移文件重新迁移, 或者将之前的迁移文件的路径修改正确 原文地址:https://www.cnblogs.com/hpcm/p/9998037.html

python调用cv2.findContours时报错:ValueError: not enough values to unpack (expected 3, got 2)

OpenCV旧版,返回三个参数: im2, contours, hierarchy = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) 要想返回三个参数: 把OpenCV 降级成3.4.3.18 就可以了,在终端输入pip install opencv-python==3.4.3.18 OpenCV 新版调用,返回两个参数: contours, hierarchy = cv2.findContours(mask, cv

python3 split( ) not enough values to unpack(expceted 2, got 1)

在运行一个小脚本时,脚本从一文本文件读取数据,事实上这个文件只有一行'count:2',并取到这个2,将其转成数字.但运行,总是报错. 代码如下: 1 with open('count.txt', 'r') as file: 2 if not file.readline(): 3 pass 4 else: 5 name, count = file.readline().split(':') 6 count = int(count) code 错误信息如下: '''Traceback (most

libsvm easy.py ValueError: need more than 0 values to unpack windows下终极解决

现象是: python easy.py train test 输出: Scaling training data...WARNING: original #nonzeros 100389 new #nonzeros 9983948Use -l 0 if many original feature values are zerosCross validation...Traceback (most recent call last): File "easy.py", line 61, i

python celery多worker、多队列、定时任务

多worker.多队列 celery是一个分布式的任务调度模块,那么怎么实现它的分布式功能呢,celery可以支持多台不同的计算机执行不同的任务或者相同的任务. 如果要说celery的分布式应用的话,就要提到celery的消息路由机制,提到AMQP协议. 简单理解: 可以有多个"消息队列"(message Queue),不同的消息可以指定发送给不同的Message Queue, 而这是通过Exchange来实现的,发送消息到"消息队列"中时,可以指定routiing

rror: too many values to unpack

方法返回值 原文地址:https://www.cnblogs.com/UUUz/p/10279219.html

Celery提交任务出错?

跟着官方的入门教程部署和运行的,为啥报这个错? tasks.py # -*- encoding:UTF-8 -*- from celery import Celery brokers = 'redis://localhost:6379' backend = 'redis://localhost:6379' app = Celery('tasks', broker=brokers, backend=backend) app.control.purge() @app.task def add(x,