Jump to solution
Verify

The Fix

pip install celery==4.4.0rc5

Based on closed celery/celery issue #5175 · PR/commit linked

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Jump to Verify Open PR/Commit
@@ -1 +1 @@ @@ -1 +1 @@ -redis>=2.10.5 +redis>=2.10.5,<3
repro.py
[2018-11-15 09:55:33,342: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'iteritems'",) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/celery/worker/worker.py", line 205, in start self.blueprint.start(self) File "/usr/local/lib/python2.7/dist-packages/celery/bootsteps.py", line 119, in start step.start(parent) File "/usr/local/lib/python2.7/dist-packages/celery/bootsteps.py", line 369, in start return self.obj.start() File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer/consumer.py", line 317, in start blueprint.start(self) File "/usr/local/lib/python2.7/dist-packages/celery/bootsteps.py", line 119, in start step.start(parent) File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer/consumer.py", line 593, in start c.loop(*c.loop_args()) File "/usr/local/lib/python2.7/dist-packages/celery/worker/loops.py", line 91, in asynloop next(loop) File "/usr/local/lib/python2.7/dist-packages/kombu/asynchronous/hub.py", line 354, in create_loop cb(*cbargs) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 1040, in on_readable self.cycle.on_readable(fileno) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 337, in on_readable chan.handlers[type]() File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 724, in _brpop_read self.connection._deliver(loads(bytes_to_str(item)), dest) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 983, in _deliver callback(message) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 632, in _callback self.qos.append(message, message.delivery_tag) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 149, in append pipe.zadd(self.unacked_index_key, time(), delivery_tag) \ File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 2263, in zadd for pair in iteritems(mapping): File "/usr/local/lib/python2.7/dist-packages/redis/_compat.py", line 94, in iteritems return x.iteritems() AttributeError: 'float' object has no attribute 'iteritems'
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install celery==4.4.0rc5\nWhen NOT to use: This fix is not applicable if your application requires features from redis version 3.\n\n

Why This Fix Works in Production

  • Trigger: [2018-11-15 09:55:33,342: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'iteritems'",)
  • Mechanism: Version 3 of the redis package is backwards incompatible and causes a bunch of breakage
  • Why the fix works: Restricts the redis dependency to version 2 to avoid compatibility issues with version 3. (first fixed release: 4.4.0rc5).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Shows up under Python 3.6 in real deployments (not just unit tests).
  • Version 3 of the redis package is backwards incompatible and causes a bunch of breakage
  • Surfaces as: [2018-11-15 09:55:33,342: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'iteritems'",)

Proof / Evidence

  • GitHub issue: #5175
  • Fix PR: https://github.com/celery/celery/pull/5176
  • First fixed release: 4.4.0rc5
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.85
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.28

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“Not a celery issue - Seems to be an issue with Redis 3.0.0.post1 installed via pip. Solution: Roll back redis with pip: everything working again…”
@sethsec · 2018-11-15 · source
“Dependency pinning is a celery issue. Looks to be fixed here though https://github.com/celery/celery/pull/5176”
@dannyshaw · 2018-11-16 · source
“You can pin the dependency outside of Celery until this is fixed.”
@clokep · 2018-11-16 · confirmation · source
“Can we quick release 4.2.2 to solve this please?”
@guyisra · 2018-11-16 · source

Failure Signature (Search String)

  • [2018-11-15 09:55:33,342: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'iteritems'",)

Error Message

Stack trace
error.txt
Error Message ------------- [2018-11-15 09:55:33,342: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'iteritems'",) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/celery/worker/worker.py", line 205, in start self.blueprint.start(self) File "/usr/local/lib/python2.7/dist-packages/celery/bootsteps.py", line 119, in start step.start(parent) File "/usr/local/lib/python2.7/dist-packages/celery/bootsteps.py", line 369, in start return self.obj.start() File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer/consumer.py", line 317, in start blueprint.start(self) File "/usr/local/lib/python2.7/dist-packages/celery/bootsteps.py", line 119, in start step.start(parent) File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer/consumer.py", line 593, in start c.loop(*c.loop_args()) File "/usr/local/lib/python2.7/dist-packages/celery/worker/loops.py", line 91, in asynloop next(loop) File "/usr/local/lib/python2.7/dist-packages/kombu/asynchronous/hub.py", line 354, in create_loop cb(*cbargs) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 1040, in on_readable self.cycle.on_readable(fileno) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 337, in on_readable chan.handlers[type]() File "/usr/local/lib/python ... (truncated) ...

Minimal Reproduction

repro.py
[2018-11-15 09:55:33,342: CRITICAL/MainProcess] Unrecoverable error: AttributeError("'float' object has no attribute 'iteritems'",) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/celery/worker/worker.py", line 205, in start self.blueprint.start(self) File "/usr/local/lib/python2.7/dist-packages/celery/bootsteps.py", line 119, in start step.start(parent) File "/usr/local/lib/python2.7/dist-packages/celery/bootsteps.py", line 369, in start return self.obj.start() File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer/consumer.py", line 317, in start blueprint.start(self) File "/usr/local/lib/python2.7/dist-packages/celery/bootsteps.py", line 119, in start step.start(parent) File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer/consumer.py", line 593, in start c.loop(*c.loop_args()) File "/usr/local/lib/python2.7/dist-packages/celery/worker/loops.py", line 91, in asynloop next(loop) File "/usr/local/lib/python2.7/dist-packages/kombu/asynchronous/hub.py", line 354, in create_loop cb(*cbargs) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 1040, in on_readable self.cycle.on_readable(fileno) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 337, in on_readable chan.handlers[type]() File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 724, in _brpop_read self.connection._deliver(loads(bytes_to_str(item)), dest) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 983, in _deliver callback(message) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 632, in _callback self.qos.append(message, message.delivery_tag) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 149, in append pipe.zadd(self.unacked_index_key, time(), delivery_tag) \ File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 2263, in zadd for pair in iteritems(mapping): File "/usr/local/lib/python2.7/dist-packages/redis/_compat.py", line 94, in iteritems return x.iteritems() AttributeError: 'float' object has no attribute 'iteritems'

Environment

  • Python: 3.6

What Broke

Celery worker fails to start, throwing an AttributeError related to redis dependency.

Why It Broke

Version 3 of the redis package is backwards incompatible and causes a bunch of breakage

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install celery==4.4.0rc5

When NOT to use: This fix is not applicable if your application requires features from redis version 3.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/celery/celery/pull/5176

First fixed release: 4.4.0rc5

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix is not applicable if your application requires features from redis version 3.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
  • Pin production dependencies and upgrade only with a reproducible test that hits the failing path.

Version Compatibility Table

VersionStatus
4.4.0rc5 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.