<h2 dir="auto">Checklist</h2>
<h4 dir="auto">system info</h4>
<blockquote>
<p dir="auto">software -&gt; celery:4.1.0 (latentcall) kombu:4.1.0 py:3.6.2<br>
billiard:3.5.0.3 py-amqp:2.2.1<br>
platform -&gt; system:Windows arch:32bit, WindowsPE imp:CPython<br>
loader   -&gt; celery.loaders.app.AppLoader<br>
settings -&gt; transport:pyamqp results:redis<br>
broker_url: 'amqp://guest:<strong>@<em>.</em>.*.:5672//'<br>
result_backend: 'redis://:</strong>@<em>.</em>.<em>.</em>/0'    I try sqlite and remove backend too, but not working</p>
</blockquote>
<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>
</ul>
<h2 dir="auto">Steps to reproduce</h2>
<p dir="auto">I follow the <a href="http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html#running-the-celery-worker-server" rel="nofollow">tutorial</a> which on official website to run <code class="notranslate">task.py</code> in my win10,<br>
but get error</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">print success</p>
<h2 dir="auto">Actual behavior</h2>
<p dir="auto">I name the file <code class="notranslate">tasks.py</code> to <code class="notranslate">mytask.pl</code>, so I try to run in</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery -A mytask worker -l info"><pre class="notranslate"><code class="notranslate">celery -A mytask worker -l info
</code></pre></div>
<p dir="auto">It connecting OK.</p>
<p dir="auto">BUT when I try to run  the test <code class="notranslate">add.delay(2,2)</code> example , I get the error below:</p>
<blockquote>
<p dir="auto">[2017-08-02 19:59:04,777: ERROR/MainProcess] Task handler raised error: ValueError('not enough values to unpack (expected 3, got 0)',)<br>
Traceback (most recent call last):<br>
File "d:\python\python36-32\lib\site-packages\billiard\pool.py", line 358, in workloop<br>
result = (True, prepare_result(fun(*args, **kwargs)))<br>
File "d:\python\python36-32\lib\site-packages\celery\app\trace.py", line 525, in _fast_trace_task<br>
tasks, accept, hostname = _loc<br>
ValueError: not enough values to unpack (expected 3, got 0)<br>
[2017-08-02 20:04:30,870: INFO/MainProcess] Received task: mytask.hello[ec84d3ba-98ac-44bc-be5e-09190c2712e0]<br>
[2017-08-02 20:04:30,873: ERROR/MainProcess] Task handler raised error: ValueError('not enough values to unpack (expected 3, got 0)',)<br>
Traceback (most recent call last):<br>
File "d:\python\python36-32\lib\site-packages\billiard\pool.py", line 358, in workloop<br>
result = (True, prepare_result(fun(*args, **kwargs)))<br>
File "d:\python\python36-32\lib\site-packages\celery\app\trace.py", line 525, in _fast_trace_task<br>
tasks, accept, hostname = _loc<br>
ValueError: not enough values to unpack (expected 3, got 0)</p>
</blockquote>
<h2 dir="auto">My Solution</h2>
<p dir="auto">Try to uninstall celery 4.1.0 and replace to 3.1.24</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip uninstall celery
pip install celery==3.1.24"><pre class="notranslate"><code class="notranslate">pip uninstall celery
pip install celery==3.1.24
</code></pre></div>
<p dir="auto">Than  It Work Fine For Me !  Everything is OK!   I think this information is useful to you</p>
<p dir="auto">This version report:</p>
<blockquote>
<p dir="auto">software -&gt; celery:3.1.24 (Cipater) kombu:3.0.37 py:3.6.2<br>
billiard:3.3.0.23 py-amqp:1.4.9<br>
platform -&gt; system:Windows (Win10) arch:32bit, WindowsPE imp:CPython<br>
loader   -&gt; celery.loaders.app.AppLoader<br>
settings -&gt; transport:pyamqp results:redis://:**@****/0</p>
</blockquote>
<h3 dir="auto">Why 3.1.24 ?</h3>
<p dir="auto">It's my guess , Just looking for a lower version than 4</p>
<p dir="auto">Celery 4.x starts (with fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="234432105" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4078" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/4078/hovercard" href="https://github.com/celery/celery/pull/4078">#4078</a>) but all tasks crash</p>
<h2 dir="auto">Steps to reproduce</h2>
<p dir="auto">Use <strong>First Steps</strong> tutorial (<a href="http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html" rel="nofollow">http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html</a>)</p>
<p dir="auto">celery -A tasks worker --loglevel=info<br>
add.delay(2,2)</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Task is executed and a result of 4 is produced</p>
<h2 dir="auto">Actual behavior</h2>
<p dir="auto">Celery crashes.</p>
<p dir="auto">"C:\Program Files\Python36\Scripts\celery.exe" -A perse.celery worker -l info</p>
<p dir="auto">-------------- celery@PETRUS v4.0.2 (latentcall)<br>
---- **** -----<br>
--- * ***  * -- Windows-10-10.0.14393-SP0 2017-06-08 15:31:22<br>
-- * - **** ---</p>
<ul dir="auto">
<li>** ---------- [config]</li>
<li>** ---------- .&gt; app:         perse:0x24eecc088d0</li>
<li>** ---------- .&gt; transport:   amqp://guest:**<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/localhost/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/localhost">@localhost</a>:5672//</li>
<li>** ---------- .&gt; results:     rpc://</li>
<li>*** --- * --- .&gt; concurrency: 12 (prefork)<br>
-- ******* ---- .&gt; task events: OFF (enable -E to monitor tasks in this worker)<br>
--- ***** -----<br>
-------------- [queues]<br>
.&gt; celery           exchange=celery(direct) key=celery</li>
</ul>
<p dir="auto">[tasks]<br>
. perse.tasks.celery_add</p>
<p dir="auto">[2017-06-08 15:31:22,685: INFO/MainProcess] Connected to amqp://guest:**@127.0.0.1:5672//<br>
[2017-06-08 15:31:22,703: INFO/MainProcess] mingle: searching for neighbors<br>
[2017-06-08 15:31:23,202: INFO/SpawnPoolWorker-5] child process 5124 calling self.run()<br>
[2017-06-08 15:31:23,207: INFO/SpawnPoolWorker-4] child process 10848 calling self.run()<br>
[2017-06-08 15:31:23,208: INFO/SpawnPoolWorker-10] child process 5296 calling self.run()<br>
[2017-06-08 15:31:23,214: INFO/SpawnPoolWorker-1] child process 5752 calling self.run()<br>
[2017-06-08 15:31:23,218: INFO/SpawnPoolWorker-3] child process 11868 calling self.run()<br>
[2017-06-08 15:31:23,226: INFO/SpawnPoolWorker-11] child process 9544 calling self.run()<br>
[2017-06-08 15:31:23,227: INFO/SpawnPoolWorker-6] child process 16332 calling self.run()<br>
[2017-06-08 15:31:23,229: INFO/SpawnPoolWorker-8] child process 3384 calling self.run()<br>
[2017-06-08 15:31:23,234: INFO/SpawnPoolWorker-12] child process 8020 calling self.run()<br>
[2017-06-08 15:31:23,241: INFO/SpawnPoolWorker-9] child process 15612 calling self.run()<br>
[2017-06-08 15:31:23,243: INFO/SpawnPoolWorker-7] child process 9896 calling self.run()<br>
[2017-06-08 15:31:23,245: INFO/SpawnPoolWorker-2] child process 260 calling self.run()<br>
[2017-06-08 15:31:23,730: INFO/MainProcess] mingle: all alone<br>
[2017-06-08 15:31:23,747: INFO/MainProcess] celery@PETRUS ready.<br>
[2017-06-08 15:31:49,412: INFO/MainProcess] Received task: perse.tasks.celery_add[524d788e-e024-493d-9ed9-4b009315fea3]<br>
[2017-06-08 15:31:49,416: ERROR/MainProcess] Task handler raised error: ValueError('not enough values to unpack (expected 3, got 0)',)<br>
Traceback (most recent call last):<br>
File "c:\program files\python36\lib\site-packages\billiard\pool.py", line 359, in workloop<br>
result = (True, prepare_result(fun(*args, **kwargs)))<br>
File "c:\program files\python36\lib\site-packages\celery\app\trace.py", line 518, in _fast_trace_task<br>
tasks, accept, hostname = _loc<br>
ValueError: not enough values to unpack (expected 3, got 0)</p>
<h2 dir="auto">Fix</h2>
<p dir="auto">See pull request <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="234432105" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4078" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/4078/hovercard" href="https://github.com/celery/celery/pull/4078">#4078</a></p>