You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minimal Result Backend Client Version: N/A or Unknown
Python Packages
pip freeze Output:
Other Dependencies
N/A
Minimally Reproducible Test Case
Expected Behavior
The signature.link method could raise AttributeError if signature is built with from_dict class method. It should call the from_dict class method if this happens to transform the dict into a Signature instance. The call should be recursive to rebuild all sub-signatures if they are dict instances instead of Signature.
Actual Behavior
[2019-10-31 15:35:07,882: ERROR/ForkPoolWorker-8] Task cancel[5eaedd7c-9d11-42e6-88fd-952b2526ab2a] raised unexpected: AttributeError("'dict' object has no attribute 'link'")
Traceback (most recent call last):
File "/home/[...]/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/[...]/venv/lib/python3.7/site-packages/celery/app/trace.py", line 650, in __protected_call__
return self.run(*args, **kwargs)
[...]
File "/home/[...]/venv/lib/python3.7/site-packages/celery/canvas.py", line 1351, in link
self.body.link(callback)
File "/home/[...]/venv/lib/python3.7/site-packages/celery/canvas.py", line 1041, in link
return self.tasks[0].link(sig)
AttributeError: 'dict' object has no attribute 'link'
I'm not an expert in Celery code byt maybe it should be possible to replace:
def link(self, sig):
# Simply link to first task
sig = sig.clone().set(immutable=True)
return self.tasks[0].link(sig)
by:
def link(self, sig):
# Simply link to first task
sig = sig.clone().set(immutable=True)
try:
return self.tasks[0].link(sig)
except AttributeError:
return Signature.from_dict(self.tasks[0]).link(sig)
The same applies to link_error.
The text was updated successfully, but these errors were encountered:
Checklist
contribution guide
on reporting bugs.
for similar or identical bug reports.
for existing proposed fixes.
to find out if the bug was already fixed in the master branch.
in this issue (If there are none, check this box anyway).
Mandatory Debugging Information
celery -A proj report
in the issue.(if you are not able to do this, then at least specify the Celery
version affected).
master
branch of Celery.pip freeze
in the issue.to reproduce this bug.
Optional Debugging Information
and/or implementation.
result backend.
broker and/or result backend.
ETA/Countdown & rate limits disabled.
and/or upgrading Celery and its dependencies.
Related Issues and Possible Duplicates
Related Issues
Possible Duplicates
Environment & Settings
Celery version: 4.3.0
celery report
Output:Steps to Reproduce
Required Dependencies
Python Packages
pip freeze
Output:Other Dependencies
N/A
Minimally Reproducible Test Case
Expected Behavior
The signature.link method could raise AttributeError if signature is built with from_dict class method. It should call the from_dict class method if this happens to transform the dict into a Signature instance. The call should be recursive to rebuild all sub-signatures if they are dict instances instead of Signature.
Actual Behavior
I'm not an expert in Celery code byt maybe it should be possible to replace:
by:
The same applies to link_error.
The text was updated successfully, but these errors were encountered: