The Fix
pip install celery==5.1.2
Based on closed celery/celery issue #6846 · PR/commit linked
Production note: This usually shows up under retries/timeouts. Treat it as a side-effect risk until you can verify behavior with a canary + real traffic.
@@ -644,8 +644,13 @@ def set_chord_size(self, group_id, chord_size):
**kwargs):
kwargs['result'] = [r.as_tuple() for r in header_result]
- queue = body.options.get('queue', getattr(body.type, 'queue', None))
- priority = body.options.get('priority', getattr(body.type, 'priority', 0))
+ try:
from celery_movies.celery import celery_app
@celery_app.task(name='movies.task.publish_movie', bind=True)
def publish_movie(self, *args, **kwargs):
print("publishing movie")
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==5.1.2\nWhen NOT to use: This fix should not be used if the callback task is intentionally designed to be unregistered.\n\n
Why This Fix Works in Production
- Trigger: [2021-07-07 20:01:48,298: WARNING/MainProcess] C:\Users\markb\.virtualenvs\celery_movies\lib ite-packages\celery\app\trace.py:659: RuntimeWarning: Exception…
- Mechanism: Chords created by Signatures throw a NotRegistered error when the callback task does not belong to the same queue as the initiating task
- Why the fix works: Fixes the issue where Chords created by Signatures throw a NotRegistered error when the callback task does not belong to the same queue as the initiating task. (first fixed release: 5.1.2).
- 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
- Chords created by Signatures throw a NotRegistered error when the callback task does not belong to the same queue as the initiating task
- Surfaces as: [2021-07-07 20:01:48,298: WARNING/MainProcess] C:\Users\markb\.virtualenvs\celery_movies\lib\site-packages\celery\app\trace.py:659: RuntimeWarning: Exception raised outside body:…
Proof / Evidence
- GitHub issue: #6846
- Fix PR: https://github.com/celery/celery/pull/6847
- First fixed release: 5.1.2
- 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.42
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Hey @ghoulmaster :wave:, Thank you for opening an issue”
“Yes, but pr needs a little work. Will work on it later”
Failure Signature (Search String)
- [2021-07-07 20:01:48,298: WARNING/MainProcess] C:\Users\markb\.virtualenvs\celery_movies\lib ite-packages\celery\app\trace.py:659: RuntimeWarning: Exception raised outside body:
Error Message
Stack trace
Error Message
-------------
[2021-07-07 20:01:48,298: WARNING/MainProcess] C:\Users\markb\.virtualenvs\celery_movies\lib\site-packages\celery\app\trace.py:659: RuntimeWarning: Exception raised outside body: Task of kind 'news.task.publish_news' never registered, please make sure it's imported.:
Traceback (most recent call last):
File "C:\Users\markb\.virtualenvs\celery_movies\lib\site-packages\cached_property.py", line 70, in __get__
return obj_dict[name]
KeyError: 'type'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\markb\.virtualenvs\celery_movies\lib\site-packages\celery\app\trace.py", line 515, in trace_task
priority=task_priority
File "C:\Users\markb\.virtualenvs\celery_movies\lib\site-packages\celery\canvas.py", line 1416, in apply_async
return self.run(tasks, body, args, task_id=task_id, **merged_options)
File "C:\Users\markb\.virtualenvs\celery_movies\lib\site-packages\celery\canvas.py", line 1488, in run
max_retries=max_retries,
File "C:\Users\markb\.virtualenvs\celery_movies\lib\site-packages\celery\backends\base.py", line 657, in apply_chord
self.fallback_chord_unlock(header_result, body, **kwargs)
File "C:\Users\markb\.virtualenvs\celery_movies\lib\site-packages\celery\backends\base.py", line 642, in fallback_chord_unlock
queue = body.options.get('queue', getattr(body.type, 'queue', No
... (truncated) ...
Minimal Reproduction
from celery_movies.celery import celery_app
@celery_app.task(name='movies.task.publish_movie', bind=True)
def publish_movie(self, *args, **kwargs):
print("publishing movie")
What Broke
Tasks fail with NotRegistered error, causing workflow interruptions in production.
Why It Broke
Chords created by Signatures throw a NotRegistered error when the callback task does not belong to the same queue as the initiating task
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install celery==5.1.2
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/6847
First fixed release: 5.1.2
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be used if the callback task is intentionally designed to be unregistered.
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 |
|---|---|
| 5.1.2 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.