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

后端 未结 4 1745
一生所求
一生所求 2021-02-19 10:50

I\'ve been running a flask application with a celery worker and redis in three separated docker containers without any issue.

This is how I start it:

cele

相关标签:
4条回答
  • 2021-02-19 10:57

    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.

    0 讨论(0)
  • 2021-02-19 11:00

    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.

    0 讨论(0)
  • 2021-02-19 11:03

    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.

    0 讨论(0)
  • 2021-02-19 11:12

    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

    0 讨论(0)
提交回复
热议问题