The Fix
pip install celery==4.4.0rc5
Based on closed celery/celery issue #5265 · 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%.
@@ -1045,7 +1045,13 @@ def link(self, sig):
def link_error(self, sig):
- sig = sig.clone().set(immutable=True)
+ try:
+ sig = sig.clone().set(immutable=True)
$ mypy -2 -p celery --ignore-missing-imports
celery/backends/mongodb.py:31: error: Name 'InvalidDocument' already defined (possibly by an import)
celery/beat.py:658: error: Name '_Process' already defined on line 656
celery/contrib/pytest.py:18: error: Type signature has too few arguments
celery/contrib/pytest.py:46: error: Type signature has too few arguments
celery/contrib/pytest.py:66: error: Type signature has too few arguments
celery/contrib/pytest.py:163: error: Type signature has too few arguments
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 the input is guaranteed to always be a Signature object.\n\nOption C — Workaround\nI have found to make this issue gone in my case, is to change the `link_error` method from:\nWhen NOT to use: This fix is not applicable if the input is guaranteed to always be a Signature object.\n\n
Why This Fix Works in Production
- Trigger: parent_id=uuid, root_id=root_id,
- Mechanism: The error occurs when a dictionary is passed instead of a Signature object, leading to an AttributeError
- Why the fix works: Fixes an AttributeError when the signature is not a Signature object by handling the exception and converting the input to a Signature from a dictionary. (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
- The error occurs when a dictionary is passed instead of a Signature object, leading to an AttributeError
- Surfaces as: Traceback (most recent call last):
Proof / Evidence
- GitHub issue: #5265
- Fix PR: https://github.com/celery/celery/pull/5297
- 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.38
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“The only workaround I have found to make this issue gone in my case, is to change the link_error method from: to: No explanation or…”
“This went away after updating the redis server. The server showing the error was using redis 3. After upgrading to redis 4 the issue went…”
“I could reproduce the error in my box using redis 3. @thedrow Should we reopen this, or let just this issue as a historical note.…”
“Opps! I have just been hit by the same error with Redis 5. So, I'm guessing I was just lucky when I upgraded the server…”
Failure Signature (Search String)
- parent_id=uuid, root_id=root_id,
Error Message
Stack trace
Error Message
-------------
Traceback (most recent call last):
File "eggs/celery-4.2.1-py2.7.egg/celery/app/trace.py", line 439, in trace_task
parent_id=uuid, root_id=root_id,
File "eggs/celery-4.2.1-py2.7.egg/celery/canvas.py", line 1232, in apply_async
return self.run(tasks, body, args, task_id=task_id, **options)
File "eggs/celery-4.2.1-py2.7.egg/celery/canvas.py", line 1277, in run
header_result = header(*partial_args, task_id=group_id, **options)
File "eggs/celery-4.2.1-py2.7.egg/celery/canvas.py", line 953, in __call__
return self.apply_async(partial_args, **options)
File "eggs/celery-4.2.1-py2.7.egg/celery/canvas.py", line 978, in apply_async
args=args, kwargs=kwargs, **options))
File "eggs/celery-4.2.1-py2.7.egg/celery/canvas.py", line 1054, in _apply_tasks
**options)
File "eggs/celery-4.2.1-py2.7.egg/celery/canvas.py", line 557, in apply_async
dict(self.options, **options) if options else self.options))
File "eggs/celery-4.2.1-py2.7.egg/celery/canvas.py", line 573, in run
task_id, group_id, chord,
File "eggs/celery-4.2.1-py2.7.egg/celery/canvas.py", line 683, in prepare_steps
task.link_error(errback)
File "eggs/celery-4.2.1-py2.7.egg/celery/canvas.py", line 1016, in link_error
sig = sig.clone().set(immutable=True)
AttributeError: 'dict' object has no attribute 'clone'
Minimal Reproduction
$ mypy -2 -p celery --ignore-missing-imports
celery/backends/mongodb.py:31: error: Name 'InvalidDocument' already defined (possibly by an import)
celery/beat.py:658: error: Name '_Process' already defined on line 656
celery/contrib/pytest.py:18: error: Type signature has too few arguments
celery/contrib/pytest.py:46: error: Type signature has too few arguments
celery/contrib/pytest.py:66: error: Type signature has too few arguments
celery/contrib/pytest.py:163: error: Type signature has too few arguments
What Broke
Users experience AttributeError when executing complex canvases, causing task failures.
Why It Broke
The error occurs when a dictionary is passed instead of a Signature object, leading to an AttributeError
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.
Option C — Workaround Temporary workaround
I have found to make this issue gone in my case, is to change the `link_error` method from:
Use only if you cannot change versions today. Treat this as a stopgap and remove once upgraded.
Fix reference: https://github.com/celery/celery/pull/5297
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 the input is guaranteed to always be a Signature object.
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.