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%.
@@ -1 +1 @@
@@ -1 +1 @@
-redis>=2.10.5
+redis>=2.10.5,<3
[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'
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
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).
- 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…”
“Dependency pinning is a celery issue. Looks to be fixed here though https://github.com/celery/celery/pull/5176”
“You can pin the dependency outside of Celery until this is fixed.”
“Can we quick release 4.2.2 to solve this please?”
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 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
[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
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.
When NOT to Use This Fix
- This fix is not applicable if your application requires features from redis version 3.
Verify Fix
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
| Version | Status |
|---|---|
| 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.