Celery CRITICAL/MainProcess] Unrecoverable error: AttributeError(“'float' object has no attribute 'items'”,)

↘锁芯ラ 提交于 2019-12-04 00:52:07

The problem was that the my celery container downloaded a new release of the redis package with pip at build time, eventually with a bug or a serious change that crashes when celery tries to use it when connecting to redis. This new redis library is the 3.0.0 and it was released today.

To fix the issue you have to specify the previous version in the requirements.txt (which is 2.10.6).

And actually, specifying package versions in the requirements.txt is a good practice that prevents this type of problems.

I ran into this same issue today. hopefully this gets resolved shortly in an update by Celery. I reverted back to a previous version as well.

Not enough rep yet for a comment:

This issue is tracked by the celery folks in: https://github.com/celery/celery/issues/5175

Leading to this PR: https://github.com/celery/celery/pull/5176

Which has been merged and reverted. Because some other fix landed. I'm not sure if this fixed it. It is no longer relevant for me.

For anyone who use the docker-airflow, I used the folk of puckel/docker-airflow Just need to modify the dockerfile by adding

   && pip install 'redis>=2.10.5,<3'\

replace celery[redis] with only celery, by adding celery in apache-airflow built-in module i.e.,

  && pip install apache-airflow[crypto,celery,postgres,hive,jdbc,mysql]==$AIRFLOW_VERSION 

Update: They also change the docker-airflow dockerfile recently to fix this bug, see here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!