<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown &amp; rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>Celery version</strong>:</p>

<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate">
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>

<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.6</li>
<li><strong>Minimal Celery Version</strong>: 4.3.0</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: Redis 5.x</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<p dir="auto">Minimal example:</p>
<h3 dir="auto">Python Packages</h3>

<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="alembic==0.9.10
amqp==2.5.2
ansible==2.8.4
arrow==0.15.5
asn1crypto==0.24.0
Authlib==0.14.1
awscli==1.16.289
backcall==0.1.0
backoff==1.10.0
bcrypt==3.1.7
beautifulsoup4==4.8.2
billiard==3.5.0.5
blist==1.3.6
boto3==1.12.14
botocore==1.15.14
cachetools==3.1.1
celery==4.2.2
certifi==2019.11.28
cffi==1.14.0
chardet==3.0.4
cloudpickle==1.2.1
colorama==0.3.9
crc16==0.1.1
cryptography==2.8
cyordereddict==1.0.0
dask==2.10.1
decorator==4.4.0
deepdiff==3.3.0
docopt==0.6.2
docutils==0.15.2
dpkt==1.9.2
fsspec==0.6.2
greenlet==0.4.15
idna==2.9
importlib-metadata==1.5.0
ipython==7.8.0
ipython-genutils==0.2.0
jedi==0.15.1
Jinja2==2.11.1
jmespath==0.9.5
jsonpickle==1.3
kombu==4.6.0
kvdr==1.0.4
locket==0.2.0
lxml==4.5.0
lz4==3.0.2
Mako==1.1.2
MarkupSafe==1.1.1
msgpack==1.0.0
msgpack-python==0.5.6
numexpr==2.7.1
numpy==1.18.1
pandas==0.22.0
pandas-datareader==0.8.1
paramiko==2.7.1
parso==0.5.1
partd==1.1.0
pexpect==4.7.0
pickleshare==0.7.5
prompt-toolkit==2.0.9
psutil==5.7.0
psycopg2-binary==2.8.4
ptyprocess==0.6.0
pudb==2019.1
pyasn1==0.4.7
pycparser==2.20
pycrypto==2.6.1
pydocstyle==1.1.1
Pygments==2.4.2
Pympler==0.8
PyNaCl==1.3.0
pyOpenSSL==19.1.0
pysftp==0.2.9
python-dateutil==2.8.1
python-editor==1.0.4
python-gnupg==0.4.5
python-redis==0.2.2
python-snappy==0.5.4
pytz==2019.3
PyYAML==5.3
rarfile==3.1
redis==3.4.1
requests==2.23.0
requests-oauth2==0.3.0
rsa==3.4.2
s3fs==0.4.0
s3transfer==0.3.3
six==1.14.0
sortedcontainers==2.1.0
soupsieve==2.0
SQLAlchemy==1.3.13
tables==3.6.1
toolz==0.10.0
traitlets==4.3.2
urllib3==1.25.8
urwid==2.0.1
vine==1.3.0
wcwidth==0.1.7
wrapt==1.11.2
xlrd==1.2.0
zipp==3.1.0"><pre class="notranslate"><code class="notranslate">alembic==0.9.10
amqp==2.5.2
ansible==2.8.4
arrow==0.15.5
asn1crypto==0.24.0
Authlib==0.14.1
awscli==1.16.289
backcall==0.1.0
backoff==1.10.0
bcrypt==3.1.7
beautifulsoup4==4.8.2
billiard==3.5.0.5
blist==1.3.6
boto3==1.12.14
botocore==1.15.14
cachetools==3.1.1
celery==4.2.2
certifi==2019.11.28
cffi==1.14.0
chardet==3.0.4
cloudpickle==1.2.1
colorama==0.3.9
crc16==0.1.1
cryptography==2.8
cyordereddict==1.0.0
dask==2.10.1
decorator==4.4.0
deepdiff==3.3.0
docopt==0.6.2
docutils==0.15.2
dpkt==1.9.2
fsspec==0.6.2
greenlet==0.4.15
idna==2.9
importlib-metadata==1.5.0
ipython==7.8.0
ipython-genutils==0.2.0
jedi==0.15.1
Jinja2==2.11.1
jmespath==0.9.5
jsonpickle==1.3
kombu==4.6.0
kvdr==1.0.4
locket==0.2.0
lxml==4.5.0
lz4==3.0.2
Mako==1.1.2
MarkupSafe==1.1.1
msgpack==1.0.0
msgpack-python==0.5.6
numexpr==2.7.1
numpy==1.18.1
pandas==0.22.0
pandas-datareader==0.8.1
paramiko==2.7.1
parso==0.5.1
partd==1.1.0
pexpect==4.7.0
pickleshare==0.7.5
prompt-toolkit==2.0.9
psutil==5.7.0
psycopg2-binary==2.8.4
ptyprocess==0.6.0
pudb==2019.1
pyasn1==0.4.7
pycparser==2.20
pycrypto==2.6.1
pydocstyle==1.1.1
Pygments==2.4.2
Pympler==0.8
PyNaCl==1.3.0
pyOpenSSL==19.1.0
pysftp==0.2.9
python-dateutil==2.8.1
python-editor==1.0.4
python-gnupg==0.4.5
python-redis==0.2.2
python-snappy==0.5.4
pytz==2019.3
PyYAML==5.3
rarfile==3.1
redis==3.4.1
requests==2.23.0
requests-oauth2==0.3.0
rsa==3.4.2
s3fs==0.4.0
s3transfer==0.3.3
six==1.14.0
sortedcontainers==2.1.0
soupsieve==2.0
SQLAlchemy==1.3.13
tables==3.6.1
toolz==0.10.0
traitlets==4.3.2
urllib3==1.25.8
urwid==2.0.1
vine==1.3.0
wcwidth==0.1.7
wrapt==1.11.2
xlrd==1.2.0
zipp==3.1.0
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>

<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>

<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    from myapp.app import app
    from time import sleep
    
    
    def print_stats():
        insp = app.control.inspect()
        active_lst = insp.active()
        cluster_stats = insp.stats()
        active_queues = insp.active_queues()
        all_stats = {
            &quot;active&quot;: active_lst,
            &quot;stats&quot;: cluster_stats,
            &quot;queues&quot;: active_queues
        }
        print(all_stats)
    
    
    def main():
        while True:
            print_stats()
            sleep(10)
    
    
    if __name__ == '__main__':
        main()"><pre class="notranslate">    <span class="pl-k">from</span> <span class="pl-s1">myapp</span>.<span class="pl-s1">app</span> <span class="pl-k">import</span> <span class="pl-s1">app</span>
    <span class="pl-k">from</span> <span class="pl-s1">time</span> <span class="pl-k">import</span> <span class="pl-s1">sleep</span>
    
    
    <span class="pl-k">def</span> <span class="pl-en">print_stats</span>():
        <span class="pl-s1">insp</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span>.<span class="pl-s1">control</span>.<span class="pl-en">inspect</span>()
        <span class="pl-s1">active_lst</span> <span class="pl-c1">=</span> <span class="pl-s1">insp</span>.<span class="pl-en">active</span>()
        <span class="pl-s1">cluster_stats</span> <span class="pl-c1">=</span> <span class="pl-s1">insp</span>.<span class="pl-en">stats</span>()
        <span class="pl-s1">active_queues</span> <span class="pl-c1">=</span> <span class="pl-s1">insp</span>.<span class="pl-en">active_queues</span>()
        <span class="pl-s1">all_stats</span> <span class="pl-c1">=</span> {
            <span class="pl-s">"active"</span>: <span class="pl-s1">active_lst</span>,
            <span class="pl-s">"stats"</span>: <span class="pl-s1">cluster_stats</span>,
            <span class="pl-s">"queues"</span>: <span class="pl-s1">active_queues</span>
        }
        <span class="pl-en">print</span>(<span class="pl-s1">all_stats</span>)
    
    
    <span class="pl-k">def</span> <span class="pl-en">main</span>():
        <span class="pl-k">while</span> <span class="pl-c1">True</span>:
            <span class="pl-en">print_stats</span>()
            <span class="pl-en">sleep</span>(<span class="pl-c1">10</span>)
    
    
    <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
        <span class="pl-en">main</span>()</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>

<p dir="auto">No memory leaks</p>
<h1 dir="auto">Actual Behavior</h1>

<p dir="auto">The memory consumption by the tiny example constantly grows.<br>
I left the script running over night and it always gets killed after trying to allocate more memory than the system has, so Linux automatically kills it.</p>
<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown &amp; rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>Celery version</strong>:</p>

<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>

<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.8.5</li>
<li><strong>Minimal Celery Version</strong>: 5.1.2</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>:  Pop!_OS 21.04</li>
<li><strong>Minimal Broker Client Version</strong>:  pyamqp</li>
<li><strong>Minimal Result Backend Client Version</strong>:  redis</li>
</ul>
<h3 dir="auto">Python Packages</h3>

<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>

<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>

<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>

<h1 dir="auto">Actual Behavior</h1>

<p dir="auto">When using .signature(..., queue=Queue(...),...) in a chord or chain, it tries to serialize the Queue() object, which fails. group execution does work.</p>
<p dir="auto">Exception</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py&quot;, line 42, in _reraise_errors
    yield
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py&quot;, line 213, in dumps
    payload = encoder(data)
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/utils/json.py&quot;, line 68, in dumps
    return _dumps(s, cls=cls or _default_encoder,
  File &quot;/home/darren/condas/miniconda3/lib/python3.8/json/__init__.py&quot;, line 234, in dumps
    return cls(
  File &quot;/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py&quot;, line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File &quot;/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py&quot;, line 257, in iterencode
    return _iterencode(o, 0)
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/utils/json.py&quot;, line 58, in default
    return super().default(o)
  File &quot;/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py&quot;, line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Queue is not JSON serializable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;pyfi/client/example/example2.py&quot;, line 8, in &lt;module&gt;
    result = chain([
  File &quot;/home/darren/PycharmProjects/pyfi/celery/canvas.py&quot;, line 612, in __call__
    return self.apply_async(args, kwargs)
  File &quot;/home/darren/PycharmProjects/pyfi/celery/canvas.py&quot;, line 640, in apply_async
    return self.run(args, kwargs, app=app, **(
  File &quot;/home/darren/PycharmProjects/pyfi/celery/canvas.py&quot;, line 669, in run
    result_from_apply = first_task.apply_async(**options)
  File &quot;/home/darren/PycharmProjects/pyfi/celery/canvas.py&quot;, line 219, in apply_async
    return _apply(args, kwargs, **options)
  File &quot;/home/darren/PycharmProjects/pyfi/celery/app/base.py&quot;, line 767, in send_task
    amqp.send_task_message(P, name, message, **options)
  File &quot;/home/darren/PycharmProjects/pyfi/celery/app/amqp.py&quot;, line 510, in send_task_message
    ret = producer.publish(
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/messaging.py&quot;, line 166, in publish
    body, content_type, content_encoding = self._prepare(
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/messaging.py&quot;, line 254, in _prepare
    body) = dumps(body, serializer=serializer)
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py&quot;, line 213, in dumps
    payload = encoder(data)
  File &quot;/home/darren/condas/miniconda3/lib/python3.8/contextlib.py&quot;, line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py&quot;, line 46, in _reraise_errors
    reraise(wrapper, wrapper(exc), sys.exc_info()[2])
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/exceptions.py&quot;, line 21, in reraise
    raise value.with_traceback(tb)
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py&quot;, line 42, in _reraise_errors
    yield
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py&quot;, line 213, in dumps
    payload = encoder(data)
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/utils/json.py&quot;, line 68, in dumps
    return _dumps(s, cls=cls or _default_encoder,
  File &quot;/home/darren/condas/miniconda3/lib/python3.8/json/__init__.py&quot;, line 234, in dumps
    return cls(
  File &quot;/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py&quot;, line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File &quot;/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py&quot;, line 257, in iterencode
    return _iterencode(o, 0)
  File &quot;/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/utils/json.py&quot;, line 58, in default
    return super().default(o)
  File &quot;/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py&quot;, line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
kombu.exceptions.EncodeError: Object of type Queue is not JSON serializable"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py", line 42, in _reraise_errors
    yield
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py", line 213, in dumps
    payload = encoder(data)
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/utils/json.py", line 68, in dumps
    return _dumps(s, cls=cls or _default_encoder,
  File "/home/darren/condas/miniconda3/lib/python3.8/json/__init__.py", line 234, in dumps
    return cls(
  File "/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/utils/json.py", line 58, in default
    return super().default(o)
  File "/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Queue is not JSON serializable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pyfi/client/example/example2.py", line 8, in &lt;module&gt;
    result = chain([
  File "/home/darren/PycharmProjects/pyfi/celery/canvas.py", line 612, in __call__
    return self.apply_async(args, kwargs)
  File "/home/darren/PycharmProjects/pyfi/celery/canvas.py", line 640, in apply_async
    return self.run(args, kwargs, app=app, **(
  File "/home/darren/PycharmProjects/pyfi/celery/canvas.py", line 669, in run
    result_from_apply = first_task.apply_async(**options)
  File "/home/darren/PycharmProjects/pyfi/celery/canvas.py", line 219, in apply_async
    return _apply(args, kwargs, **options)
  File "/home/darren/PycharmProjects/pyfi/celery/app/base.py", line 767, in send_task
    amqp.send_task_message(P, name, message, **options)
  File "/home/darren/PycharmProjects/pyfi/celery/app/amqp.py", line 510, in send_task_message
    ret = producer.publish(
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/messaging.py", line 166, in publish
    body, content_type, content_encoding = self._prepare(
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/messaging.py", line 254, in _prepare
    body) = dumps(body, serializer=serializer)
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py", line 213, in dumps
    payload = encoder(data)
  File "/home/darren/condas/miniconda3/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py", line 46, in _reraise_errors
    reraise(wrapper, wrapper(exc), sys.exc_info()[2])
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/exceptions.py", line 21, in reraise
    raise value.with_traceback(tb)
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py", line 42, in _reraise_errors
    yield
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/serialization.py", line 213, in dumps
    payload = encoder(data)
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/utils/json.py", line 68, in dumps
    return _dumps(s, cls=cls or _default_encoder,
  File "/home/darren/condas/miniconda3/lib/python3.8/json/__init__.py", line 234, in dumps
    return cls(
  File "/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/darren/PycharmProjects/pyfi/venv/lib/python3.8/site-packages/kombu-5.1.0-py3.8.egg/kombu/utils/json.py", line 58, in default
    return super().default(o)
  File "/home/darren/condas/miniconda3/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
kombu.exceptions.EncodeError: Object of type Queue is not JSON serializable
</code></pre></div>