<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://github.com/celery/celery/discussions">discussions forum</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" 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"> 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="software -&gt; celery:5.2.5 (dawn-chorus) kombu:5.2.4 py:3.10.2
            billiard:3.6.4.0 py-amqp:5.1.0
platform -&gt; system:Darwin arch:64bit
            kernel version:21.4.0 imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:disabled

deprecated_settings: None"><pre class="notranslate"><code class="notranslate">software -&gt; celery:5.2.5 (dawn-chorus) kombu:5.2.4 py:3.10.2
            billiard:3.6.4.0 py-amqp:5.1.0
platform -&gt; system:Darwin arch:64bit
            kernel version:21.4.0 imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:disabled

deprecated_settings: None
</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>: N/A or Unknown</li>
<li><strong>Minimal Celery Version</strong>: N/A or Unknown</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>: 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>
<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="$ poetry export --without-hashes
amqp==5.1.0; python_version &gt;= &quot;3.7&quot;
asgiref==3.5.0; python_version &gt;= &quot;3.7&quot; and python_version &lt; &quot;4.0&quot; and python_full_version &gt;= &quot;3.7.0&quot;
async-timeout==4.0.2; python_version &gt;= &quot;3.7&quot;
beautifulsoup4==4.10.0; python_full_version &gt; &quot;3.0.0&quot;
billiard==3.6.4.0; python_version &gt;= &quot;3.7&quot;
boto3==1.21.32; python_version &gt;= &quot;3.6&quot;
botocore==1.24.32; python_version &gt;= &quot;3.6&quot;
celery==5.2.5; python_version &gt;= &quot;3.7&quot;
certifi==2021.10.8; python_version &gt;= &quot;2.7&quot; and python_full_version &lt; &quot;3.0.0&quot; or python_full_version &gt;= &quot;3.6.0&quot;
charset-normalizer==2.0.12; python_full_version &gt;= &quot;3.6.0&quot; and python_version &gt;= &quot;3&quot;
click-didyoumean==0.3.0; python_full_version &gt;= &quot;3.6.2&quot; and python_full_version &lt; &quot;4.0.0&quot; and python_version &gt;= &quot;3.7&quot;
click-plugins==1.1.1; python_version &gt;= &quot;3.7&quot;
click-repl==0.2.0; python_version &gt;= &quot;3.7&quot;
click==8.1.2; python_full_version &gt;= &quot;3.6.2&quot; and python_full_version &lt; &quot;4.0.0&quot; and python_version &gt;= &quot;3.7&quot;
colorama==0.4.4; python_version &gt;= &quot;3.7&quot; and python_full_version &lt; &quot;3.0.0&quot; and platform_system == &quot;Windows&quot; or platform_system == &quot;Windows&quot; and python_version &gt;= &quot;3.7&quot; and python_full_version &gt;= &quot;3.5.0&quot;
css-class-names==0.0.1
cssutils==2.4.0; python_version &gt;= &quot;3.7&quot;
deprecated==1.2.13; python_version &gt;= &quot;3.7&quot; and python_full_version &lt; &quot;3.0.0&quot; or python_version &gt;= &quot;3.7&quot; and python_full_version &gt;= &quot;3.4.0&quot;
dj-database-url==0.5.0
django-allianceutils==2.2.0; python_version &gt;= &quot;3.6&quot;
django-celery-results==2.3.0
django-cors-headers==3.11.0; python_version &gt;= &quot;3.7&quot;
django-csvpermissions==0.2.0; python_version &gt;= &quot;3.6&quot; and python_version &lt; &quot;4.0&quot;
django-extensions==3.1.5; python_version &gt;= &quot;3.6&quot;
django-extra-fields==3.0.2; python_version &gt;= &quot;3.5&quot;
django-filter==21.1; python_version &gt;= &quot;3.6&quot;
django-hijack==3.2.0
django-inlinecss==0.3.0
django-pgconnection==1.0.2; python_full_version &gt;= &quot;3.7.0&quot; and python_version &lt; &quot;4&quot;
django-pghistory==1.4.0; python_full_version &gt;= &quot;3.7.0&quot; and python_version &lt; &quot;4&quot;
django-pgtrigger==2.4.1; python_full_version &gt;= &quot;3.7.0&quot; and python_version &lt; &quot;4&quot;
django-phonenumber-field==6.1.0; python_version &gt;= &quot;3.7&quot;
django-safedelete==1.1.2
django-storages==1.12.3; python_version &gt;= &quot;3.5&quot;
django-stronghold==0.4.0
django==3.2.12; python_version &gt;= &quot;3.6&quot;
djangorestframework-api-key==2.2.0; python_version &gt;= &quot;3.6&quot;
djangorestframework==3.13.1; python_version &gt;= &quot;3.6&quot;
escapejson==1.0
freezegun==1.2.1; python_version &gt;= &quot;3.6&quot;
future==0.18.2; python_version &gt;= &quot;2.6&quot; and python_full_version &lt; &quot;3.0.0&quot; or python_full_version &gt;= &quot;3.3.0&quot;
gunicorn==20.1.0; python_version &gt;= &quot;3.5&quot;
idna==3.3; python_version &gt;= &quot;3.5&quot; and python_full_version &lt; &quot;3.0.0&quot; or python_full_version &gt;= &quot;3.6.0&quot; and python_version &gt;= &quot;3.5&quot;
isort==5.10.1; python_full_version &gt;= &quot;3.6.1&quot; and python_version &lt; &quot;4.0&quot;
isoweek==1.3.3
jmespath==1.0.0; python_version &gt;= &quot;3.7&quot;
kombu==5.2.4; python_version &gt;= &quot;3.7&quot;
oauthlib==3.2.0; python_version &gt;= &quot;3.6&quot; and python_full_version &lt; &quot;3.0.0&quot; or python_full_version &gt;= &quot;3.4.0&quot; and python_version &gt;= &quot;3.6&quot;
packaging==21.3; python_version &gt;= &quot;3.6&quot;
phonenumbers==8.12.46; python_version &gt;= &quot;3.7&quot;
pillow==9.1.0; python_version &gt;= &quot;3.7&quot;
prompt-toolkit==3.0.28; python_full_version &gt;= &quot;3.6.2&quot; and python_version &gt;= &quot;3.7&quot;
psycopg2==2.9.3; python_version &gt;= &quot;3.6&quot;
pynliner==0.8.0
pyparsing==3.0.7; python_version &gt;= &quot;3.7&quot;
python-dateutil==2.8.2; python_version &gt;= &quot;3.6&quot; and python_full_version &lt; &quot;3.0.0&quot; or python_full_version &gt;= &quot;3.3.0&quot; and python_version &gt;= &quot;3.6&quot;
python-dotenv==0.20.0; python_version &gt;= &quot;3.5&quot;
pytz==2022.1
qrcode==7.3.1; python_version &gt;= &quot;3.6&quot;
redis==4.2.1; python_version &gt;= &quot;3.7&quot;
requests-oauthlib==1.3.1; (python_version &gt;= &quot;2.7&quot; and python_full_version &lt; &quot;3.0.0&quot;) or (python_full_version &gt;= &quot;3.4.0&quot;)
requests==2.27.1; (python_version &gt;= &quot;2.7&quot; and python_full_version &lt; &quot;3.0.0&quot;) or (python_full_version &gt;= &quot;3.6.0&quot;)
rules==3.3
s3transfer==0.5.2; python_version &gt;= &quot;3.6&quot;
sentry-sdk==1.5.8
six==1.16.0; python_version &gt;= &quot;3.7&quot; and python_full_version &lt; &quot;3.0.0&quot; or python_full_version &gt;= &quot;3.3.0&quot; and python_version &gt;= &quot;3.7&quot;
soupsieve==2.3.1; python_version &gt;= &quot;3.6&quot; and python_full_version &gt; &quot;3.0.0&quot;
sqlparse==0.4.2; python_version &gt;= &quot;3.7&quot; and python_version &lt; &quot;4.0&quot; and python_full_version &gt;= &quot;3.7.0&quot;
urllib3==1.26.9; python_version &gt;= &quot;3.6&quot; and python_full_version &lt; &quot;3.0.0&quot; or python_full_version &gt;= &quot;3.6.0&quot; and python_version &lt; &quot;4&quot; and python_version &gt;= &quot;3.6&quot;
vine==5.0.0; python_version &gt;= &quot;3.7&quot;
wcwidth==0.2.5; python_full_version &gt;= &quot;3.6.2&quot; and python_version &gt;= &quot;3.7&quot;
werkzeug==2.0.3; python_version &gt;= &quot;3.6&quot;
wrapt==1.14.0; python_version &gt;= &quot;3.7&quot; and python_full_version &lt; &quot;3.0.0&quot; or python_version &gt;= &quot;3.7&quot; and python_full_version &gt;= &quot;3.5.0&quot;"><pre class="notranslate"><code class="notranslate">$ poetry export --without-hashes
amqp==5.1.0; python_version &gt;= "3.7"
asgiref==3.5.0; python_version &gt;= "3.7" and python_version &lt; "4.0" and python_full_version &gt;= "3.7.0"
async-timeout==4.0.2; python_version &gt;= "3.7"
beautifulsoup4==4.10.0; python_full_version &gt; "3.0.0"
billiard==3.6.4.0; python_version &gt;= "3.7"
boto3==1.21.32; python_version &gt;= "3.6"
botocore==1.24.32; python_version &gt;= "3.6"
celery==5.2.5; python_version &gt;= "3.7"
certifi==2021.10.8; python_version &gt;= "2.7" and python_full_version &lt; "3.0.0" or python_full_version &gt;= "3.6.0"
charset-normalizer==2.0.12; python_full_version &gt;= "3.6.0" and python_version &gt;= "3"
click-didyoumean==0.3.0; python_full_version &gt;= "3.6.2" and python_full_version &lt; "4.0.0" and python_version &gt;= "3.7"
click-plugins==1.1.1; python_version &gt;= "3.7"
click-repl==0.2.0; python_version &gt;= "3.7"
click==8.1.2; python_full_version &gt;= "3.6.2" and python_full_version &lt; "4.0.0" and python_version &gt;= "3.7"
colorama==0.4.4; python_version &gt;= "3.7" and python_full_version &lt; "3.0.0" and platform_system == "Windows" or platform_system == "Windows" and python_version &gt;= "3.7" and python_full_version &gt;= "3.5.0"
css-class-names==0.0.1
cssutils==2.4.0; python_version &gt;= "3.7"
deprecated==1.2.13; python_version &gt;= "3.7" and python_full_version &lt; "3.0.0" or python_version &gt;= "3.7" and python_full_version &gt;= "3.4.0"
dj-database-url==0.5.0
django-allianceutils==2.2.0; python_version &gt;= "3.6"
django-celery-results==2.3.0
django-cors-headers==3.11.0; python_version &gt;= "3.7"
django-csvpermissions==0.2.0; python_version &gt;= "3.6" and python_version &lt; "4.0"
django-extensions==3.1.5; python_version &gt;= "3.6"
django-extra-fields==3.0.2; python_version &gt;= "3.5"
django-filter==21.1; python_version &gt;= "3.6"
django-hijack==3.2.0
django-inlinecss==0.3.0
django-pgconnection==1.0.2; python_full_version &gt;= "3.7.0" and python_version &lt; "4"
django-pghistory==1.4.0; python_full_version &gt;= "3.7.0" and python_version &lt; "4"
django-pgtrigger==2.4.1; python_full_version &gt;= "3.7.0" and python_version &lt; "4"
django-phonenumber-field==6.1.0; python_version &gt;= "3.7"
django-safedelete==1.1.2
django-storages==1.12.3; python_version &gt;= "3.5"
django-stronghold==0.4.0
django==3.2.12; python_version &gt;= "3.6"
djangorestframework-api-key==2.2.0; python_version &gt;= "3.6"
djangorestframework==3.13.1; python_version &gt;= "3.6"
escapejson==1.0
freezegun==1.2.1; python_version &gt;= "3.6"
future==0.18.2; python_version &gt;= "2.6" and python_full_version &lt; "3.0.0" or python_full_version &gt;= "3.3.0"
gunicorn==20.1.0; python_version &gt;= "3.5"
idna==3.3; python_version &gt;= "3.5" and python_full_version &lt; "3.0.0" or python_full_version &gt;= "3.6.0" and python_version &gt;= "3.5"
isort==5.10.1; python_full_version &gt;= "3.6.1" and python_version &lt; "4.0"
isoweek==1.3.3
jmespath==1.0.0; python_version &gt;= "3.7"
kombu==5.2.4; python_version &gt;= "3.7"
oauthlib==3.2.0; python_version &gt;= "3.6" and python_full_version &lt; "3.0.0" or python_full_version &gt;= "3.4.0" and python_version &gt;= "3.6"
packaging==21.3; python_version &gt;= "3.6"
phonenumbers==8.12.46; python_version &gt;= "3.7"
pillow==9.1.0; python_version &gt;= "3.7"
prompt-toolkit==3.0.28; python_full_version &gt;= "3.6.2" and python_version &gt;= "3.7"
psycopg2==2.9.3; python_version &gt;= "3.6"
pynliner==0.8.0
pyparsing==3.0.7; python_version &gt;= "3.7"
python-dateutil==2.8.2; python_version &gt;= "3.6" and python_full_version &lt; "3.0.0" or python_full_version &gt;= "3.3.0" and python_version &gt;= "3.6"
python-dotenv==0.20.0; python_version &gt;= "3.5"
pytz==2022.1
qrcode==7.3.1; python_version &gt;= "3.6"
redis==4.2.1; python_version &gt;= "3.7"
requests-oauthlib==1.3.1; (python_version &gt;= "2.7" and python_full_version &lt; "3.0.0") or (python_full_version &gt;= "3.4.0")
requests==2.27.1; (python_version &gt;= "2.7" and python_full_version &lt; "3.0.0") or (python_full_version &gt;= "3.6.0")
rules==3.3
s3transfer==0.5.2; python_version &gt;= "3.6"
sentry-sdk==1.5.8
six==1.16.0; python_version &gt;= "3.7" and python_full_version &lt; "3.0.0" or python_full_version &gt;= "3.3.0" and python_version &gt;= "3.7"
soupsieve==2.3.1; python_version &gt;= "3.6" and python_full_version &gt; "3.0.0"
sqlparse==0.4.2; python_version &gt;= "3.7" and python_version &lt; "4.0" and python_full_version &gt;= "3.7.0"
urllib3==1.26.9; python_version &gt;= "3.6" and python_full_version &lt; "3.0.0" or python_full_version &gt;= "3.6.0" and python_version &lt; "4" and python_version &gt;= "3.6"
vine==5.0.0; python_version &gt;= "3.7"
wcwidth==0.2.5; python_full_version &gt;= "3.6.2" and python_version &gt;= "3.7"
werkzeug==2.0.3; python_version &gt;= "3.6"
wrapt==1.14.0; python_version &gt;= "3.7" and python_full_version &lt; "3.0.0" or python_version &gt;= "3.7" and python_full_version &gt;= "3.5.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=""><pre class="notranslate"></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Hey folks,</p>
<p dir="auto">I have a codebase that uses Celery 3.2.5 with Redis in combination with <code class="notranslate">django-celery-results</code> 2.3.0.</p>
<p dir="auto">When I run some code with <code class="notranslate">apply_async()</code> I get the following exception:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/base.py&quot;, line 1250, in backend
    return self._local.backend
AttributeError: '_thread._local' object has no attribute 'backend'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;/path/to/project/django-root/./manage.py&quot;, line 20, in &lt;module&gt;
    execute_from_command_line(sys.argv)
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/django/core/management/__init__.py&quot;, line 419, in execute_from_command_line
    utility.execute()
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/django/core/management/__init__.py&quot;, line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/django/core/management/base.py&quot;, line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/django/core/management/base.py&quot;, line 398, in execute
    output = self.handle(*args, **options)
  File &quot;/path/to/project/django-root/master_portal_app/management/commands/fetch_and_store_zoho_layout.py&quot;, line 15, in handle
    fetch_and_save_dependency_mapping().delay(layout_id=layout.id)
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/task.py&quot;, line 425, in delay
    return self.apply_async(args, kwargs)
  File &quot;/path/to/project/django-root/master_portal_app/celery.py&quot;, line 71, in apply_async
    return super().apply_async(*args, **kwargs)
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/task.py&quot;, line 575, in apply_async
    return app.send_task(
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/base.py&quot;, line 787, in send_task
    self.backend.on_task_call(P, task_id)
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/base.py&quot;, line 1252, in backend
    self._local.backend = new_backend = self._get_backend()
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/base.py&quot;, line 955, in _get_backend
    backend, url = backends.by_url(
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/backends.py&quot;, line 69, in by_url
    return by_name(backend, loader), url
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/backends.py&quot;, line 47, in by_name
    aliases.update(load_extension_class_names(extension_namespace))
  File &quot;/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/utils/imports.py&quot;, line 146, in load_extension_class_names
    yield ep.name, ':'.join([ep.module_name, ep.attrs[0]])
AttributeError: 'EntryPoint' object has no attribute 'module_name'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/base.py", line 1250, in backend
    return self._local.backend
AttributeError: '_thread._local' object has no attribute 'backend'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/project/django-root/./manage.py", line 20, in &lt;module&gt;
    execute_from_command_line(sys.argv)
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/path/to/project/django-root/master_portal_app/management/commands/fetch_and_store_zoho_layout.py", line 15, in handle
    fetch_and_save_dependency_mapping().delay(layout_id=layout.id)
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/task.py", line 425, in delay
    return self.apply_async(args, kwargs)
  File "/path/to/project/django-root/master_portal_app/celery.py", line 71, in apply_async
    return super().apply_async(*args, **kwargs)
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/task.py", line 575, in apply_async
    return app.send_task(
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/base.py", line 787, in send_task
    self.backend.on_task_call(P, task_id)
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/base.py", line 1252, in backend
    self._local.backend = new_backend = self._get_backend()
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/base.py", line 955, in _get_backend
    backend, url = backends.by_url(
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/backends.py", line 69, in by_url
    return by_name(backend, loader), url
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/app/backends.py", line 47, in by_name
    aliases.update(load_extension_class_names(extension_namespace))
  File "/path/to/project/.direnv/python-3.10.2/lib/python3.10/site-packages/celery/utils/imports.py", line 146, in load_extension_class_names
    yield ep.name, ':'.join([ep.module_name, ep.attrs[0]])
AttributeError: 'EntryPoint' object has no attribute 'module_name'
</code></pre></div>
<p dir="auto">Looking at the <code class="notranslate">importlib</code> docs, there doesn't appear to be attributes <code class="notranslate">module_name</code> or <code class="notranslate">attrs</code> on <code class="notranslate">EntryPoint</code>: <a href="https://docs.python.org/3.8/library/importlib.metadata.html#entry-points" rel="nofollow">https://docs.python.org/3.8/library/importlib.metadata.html#entry-points</a> (also confirmed with <code class="notranslate">dir(ep)</code>) ? The correct attribute seems to be <code class="notranslate">module</code> but unsure what the correct attribute would be for <code class="notranslate">attrs</code> as <code class="notranslate">attr</code> returned a string. <g-emoji class="g-emoji" alias="shrug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f937.png">🤷</g-emoji></p>
<p dir="auto">What is/would this generator have been referring to? <g-emoji class="g-emoji" alias="thinking" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f914.png">🤔</g-emoji></p>
<h1 dir="auto">Actual Behavior</h1>
<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"> 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"> 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"> 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"> 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"> 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>

<p dir="auto">Minimal Python Version: python 3.5<br>
Minimal Celery Version: celery 4.3<br>
Minimal Kombu Version: N/A or Unknown<br>
Minimal Broker Version: redis 6.0.5<br>
Minimal Result Backend Version: redis 6.0.5<br>
Minimal OS and/or Kernel Version: osx 10.15.5, ubuntu 20.04<br>
Minimal Broker Client Version: redis==3.5.3<br>
Minimal Result Backend Client Version: redis==3.5.3</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=""><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>

<p dir="auto">Results should be stored when <code class="notranslate">CELERY_RESULT_BACKEND</code> config setting is specified.</p>
<h1 dir="auto">Actual Behavior</h1>

<p dir="auto"><code class="notranslate">CELERY_RESULT_BACKEND</code> is ignored. <code class="notranslate">result_backend</code> works as expected.</p>