首页 > 其他分享 >celery 5.3.6 报错ValueError: not enough values to unpack (expected 3, got 0)

celery 5.3.6 报错ValueError: not enough values to unpack (expected 3, got 0)

时间:2023-12-06 14:12:53浏览次数:38  
标签:11 5.3 06 celery 01 报错 2023 12

celery 5.3.6 报错ValueError: not enough values to unpack

启动celery脚本报错

执行 python run_task.py报错,celery服务端和脚本端日志信息如下

 

 # celery -A tasks worker --loglevel=INFO
 
 -------------- celery@DESKTOP-BQAR0JR v5.3.6 (emerald-rush)
--- ***** -----
-- ******* ---- Windows-10-10.0.19045-SP0 2023-12-06 11:01:05
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app:         tasks:0x1a7532b6340
- ** ---------- .> transport:   redis://192.168.1.105:6379/0
- ** ---------- .> results:     redis://192.168.1.105/0
- *** --- * --- .> concurrency: 8 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
 -------------- [queues]
                .> celery           exchange=celery(direct) key=celery


[tasks]
  . tasks.add

[2023-12-06 11:01:05,903: WARNING/MainProcess] c:\users\administrator\appdata\local\programs\py
thon\python38\lib\site-packages\celery\worker\consumer\consumer.py:507: CPendingDeprecationWarn
ing: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
  warnings.warn(

[2023-12-06 11:01:06,037: INFO/MainProcess] Connected to redis://192.168.1.105:6379/0
[2023-12-06 11:01:06,039: WARNING/MainProcess] c:\users\administrator\appdata\local\programs\py
thon\python38\lib\site-packages\celery\worker\consumer\consumer.py:507: CPendingDeprecationWarn
[2023-12-06 11:01:06,864: INFO/SpawnPoolWorker-7] child process 12484 calling self.run()       
[2023-12-06 11:01:06,867: INFO/SpawnPoolWorker-5] child process 21516 calling self.run()       
[2023-12-06 11:01:07,680: INFO/MainProcess] mingle: all alone
[2023-12-06 11:01:08,304: INFO/MainProcess] celery@DESKTOP-BQAR0JR ready.
[2023-12-06 11:01:44,627: INFO/MainProcess] Task tasks.add[2e88f4bd-aebb-4f80-a0dc-c34ea27a4a22
] received
[2023-12-06 11:01:44,806: ERROR/MainProcess] Task handler raised error: ValueError('not enough 
values to unpack (expected 3, got 0)')
billiard.einfo.RemoteTraceback:
"""
Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\billiar
d\pool.py", line 361, in workloop
    result = (True, prepare_result(fun(*args, **kwargs)))
Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\billiar
d\pool.py", line 361, in workloop
    result = (True, prepare_result(fun(*args, **kwargs)))
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\celery\
app\trace.py", line 664, in fast_trace_task
    tasks, accept, hostname = _loc
ValueError: not enough values to unpack (expected 3, got 0)
worker: Hitting Ctrl+C again will terminate all running tasks!

报错 AttributeError: 'DisabledBackend' object has no attribute '_get_task_meta_for'

 

执行脚本

# coding=utf-8

from tasks import add

result = add.delay(4,4)
print('Is task ready: %s' % result.ready())

run_result = result.get(timeout=1)
print('Task Result: %s' % run_result)

解决方案

win10上运行celery4.x ,5.x就会出现这个问题,需要安装eventlet解决,问题解决。

#安装依赖
pip install eventlet


#运行work server指定eventlet
celery -A <mymodule> worker -l info -P eventlet

 

 

 

标签:11,5.3,06,celery,01,报错,2023,12
From: https://www.cnblogs.com/weiweirui/p/17879385.html

相关文章

  • vSAN集群添加宿主机报错问题处理
    背景:1、新增宿主机到vsan集群,服务器网口只有4个,所以规划vsan和管理关联到标准交换机(vsan的适配器MTU-9000、管理的适配器MTU-1500)--使用两个网口、vmotion和业务vlan关联到分布式交换机---使用两个网口;2、在往vsan集群添加宿主机的时候,新的宿主机HA状态一直停留在选举阶段;且vsan......
  • Packet.dll使用错误报错——应用程序无法正常启动(0xc000007b)
    程序打开报错: 解决方案:替换Packet.dll 1 System32和SysWOW64在Windows操作系统中的反直觉存放 ......
  • 搭建DG备库Recover database报错ORA-19909、ORA-01110
    一、问题现象客户环境LinuxOracle11.2.0.4两节点RAC主库,2节点备库;需要对这个客户的数据库使用dg切换进行迁移;第一轮搭建ADG完成后,failoverDG备库变成测试库给开发应用人员进行测试;第二轮正式切换之前,搭建重建ADG环境,restoredatabase正常,recoverdatabase报错ThuOct......
  • hive执行sql报错 FAILED: Execution Error, return code 3 from org.apache.hadoop.hi
    前言:执行hivesql报错,sql逻辑是两个表左连接并将数据插入新的表中。报错信息:[ERROR]2023-12-0515:49:49.165+0800-executesqlerror:Errorwhileprocessingstatement:FAILED:ExecutionError,returncode3fromorg.apache.hadoop.hive.ql.exec.mr.MapredLocalTa......
  • uniapp 微信小程序 onLaunch触发vuex 请求http报错600009?
    当在uniapp中的微信小程序中使用vuex触发http请求时,出现错误码600009通常表示网络请求发生了错误或失败。这个错误码通常不是uniapp或vuex特定的错误码,而是微信小程序的错误码。以下是一些可能导致此错误的原因和解决方法:网络连接问题:首先,确保您的设备已连接到互联网,并且网络连接稳......
  • 流媒体音视频/安防视频云平台/可视化监控平台EasyCVR无法启动且打印panic报错,是什么原
    国标GB视频监控管理平台/视频集中存储/云存储EasyCVR能在复杂的网络环境中,将分散的各类视频资源进行统一汇聚、整合、集中管理,实现视频资源的鉴权管理、按需调阅、全网分发、智能分析等。AI智能大数据视频分析EasyCVR平台已经广泛应用在工地、工厂、园区、楼宇、校园、仓储等场景中......
  • 流媒体音视频/安防视频云平台/可视化监控平台EasyCVR无法启动且打印panic报错,是什么原
    国标GB视频监控管理平台/视频集中存储/云存储EasyCVR能在复杂的网络环境中,将分散的各类视频资源进行统一汇聚、整合、集中管理,实现视频资源的鉴权管理、按需调阅、全网分发、智能分析等。AI智能大数据视频分析EasyCVR平台已经广泛应用在工地、工厂、园区、楼宇、校园、仓储等场景......
  • 【DevEco Studio】报错Error: spawn cmd.exe ENOENT怎么解决?
    ​【关键字】hvigor报错、Error:spawncmd.exeENOENT 【问题背景】编译的时候报Error:spawncmd.exeENOENT该怎么解决?预览的时候报Error:spawncmd.exeENOENT该怎么解决?具体报错截图如下:​​ 【解决方案】这种是环境变量缺少了C:\Windows\System32导致的,在Path......
  • 【DevEco Studio】报错Error: spawn cmd.exe ENOENT怎么解决?
    【关键字】hvigor报错、Error:spawncmd.exeENOENT【问题背景】编译的时候报Error:spawncmd.exeENOENT该怎么解决?预览的时候报Error:spawncmd.exeENOENT该怎么解决?具体报错截图如下:【解决方案】这种是环境变量缺少了C:\Windows\System32导致的,在Path里面新建一个把值复制进......
  • Jpa+mybatis混合使用时,jsqlparser一直报错
    net.sf.jsqlparser.statement.insert.Insertcannotbecasttonet.sf.jsqlparser.statement.select.Select解决<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactI......