Issue 1:
Checklist

system info

software -> celery:4.1.0 (latentcall) kombu:4.1.0 py:3.6.2

billiard:3.5.0.3 py-amqp:2.2.1

platform -> system:Windows arch:32bit, WindowsPE imp:CPython

loader -> celery.loaders.app.AppLoader

settings -> transport:pyamqp results:redis

broker_url: 'amqp://guest:@..*.:5672//'

result_backend: 'redis://:@.../0' I try sqlite and remove backend too, but not working

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

I have verified that the issue exists against the master branch of Celery.

Steps to reproduce

I follow the tutorial which on official website to run task.py in my win10,

but get error

Expected behavior

print success

Actual behavior

I name the file tasks.py to mytask.pl, so I try to run in

celery -A mytask worker -l info

It connecting OK.

BUT when I try to run the test add.delay(2,2) example , I get the error below:

[2017-08-02 19:59:04,777: ERROR/MainProcess] Task handler raised error: ValueError('not enough values to unpack (expected 3, got 0)',)

Traceback (most recent call last):

File "d:\python\python36-32\lib\site-packages\billiard\pool.py", line 358, in workloop

result = (True, prepare_result(fun(*args, **kwargs)))

File "d:\python\python36-32\lib\site-packages\celery\app\trace.py", line 525, in _fast_trace_task

tasks, accept, hostname = _loc

ValueError: not enough values to unpack (expected 3, got 0)

[2017-08-02 20:04:30,870: INFO/MainProcess] Received task: mytask.hello[ec84d3ba-98ac-44bc-be5e-09190c2712e0]

[2017-08-02 20:04:30,873: ERROR/MainProcess] Task handler raised error: ValueError('not enough values to unpack (expected 3, got 0)',)

Traceback (most recent call last):

File "d:\python\python36-32\lib\site-packages\billiard\pool.py", line 358, in workloop

result = (True, prepare_result(fun(*args, **kwargs)))

File "d:\python\python36-32\lib\site-packages\celery\app\trace.py", line 525, in _fast_trace_task

tasks, accept, hostname = _loc

ValueError: not enough values to unpack (expected 3, got 0)

My Solution

Try to uninstall celery 4.1.0 and replace to 3.1.24

pip uninstall celery
pip install celery==3.1.24

Than It Work Fine For Me ! Everything is OK! I think this information is useful to you

This version report:

software -> celery:3.1.24 (Cipater) kombu:3.0.37 py:3.6.2

billiard:3.3.0.23 py-amqp:1.4.9

platform -> system:Windows (Win10) arch:32bit, WindowsPE imp:CPython

loader -> celery.loaders.app.AppLoader

settings -> transport:pyamqp results:redis://:**@****/0

Why 3.1.24 ?

It's my guess , Just looking for a lower version than 4

Issue 2:
Celery 4.x starts (with fixes #4078) but all tasks crash

Steps to reproduce

Use First Steps tutorial (http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html)

celery -A tasks worker --loglevel=info

add.delay(2,2)

Expected behavior

Task is executed and a result of 4 is produced

Actual behavior

Celery crashes.

"C:\Program Files\Python36\Scripts\celery.exe" -A perse.celery worker -l info

-------------- celery@PETRUS v4.0.2 (latentcall)

---- **** -----

--- * *** * -- Windows-10-10.0.14393-SP0 2017-06-08 15:31:22

-- * - **** ---

** ---------- [config]

** ---------- .> app: perse:0x24eecc088d0

** ---------- .> transport: amqp://guest:**@localhost:5672//

** ---------- .> results: rpc://

*** --- * --- .> concurrency: 12 (prefork)

-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)

--- ***** -----

-------------- [queues]

.> celery exchange=celery(direct) key=celery

[tasks]

. perse.tasks.celery_add

[2017-06-08 15:31:22,685: INFO/MainProcess] Connected to amqp://guest:**@127.0.0.1:5672//

[2017-06-08 15:31:22,703: INFO/MainProcess] mingle: searching for neighbors

[2017-06-08 15:31:23,202: INFO/SpawnPoolWorker-5] child process 5124 calling self.run()

[2017-06-08 15:31:23,207: INFO/SpawnPoolWorker-4] child process 10848 calling self.run()

[2017-06-08 15:31:23,208: INFO/SpawnPoolWorker-10] child process 5296 calling self.run()

[2017-06-08 15:31:23,214: INFO/SpawnPoolWorker-1] child process 5752 calling self.run()

[2017-06-08 15:31:23,218: INFO/SpawnPoolWorker-3] child process 11868 calling self.run()

[2017-06-08 15:31:23,226: INFO/SpawnPoolWorker-11] child process 9544 calling self.run()

[2017-06-08 15:31:23,227: INFO/SpawnPoolWorker-6] child process 16332 calling self.run()

[2017-06-08 15:31:23,229: INFO/SpawnPoolWorker-8] child process 3384 calling self.run()

[2017-06-08 15:31:23,234: INFO/SpawnPoolWorker-12] child process 8020 calling self.run()

[2017-06-08 15:31:23,241: INFO/SpawnPoolWorker-9] child process 15612 calling self.run()

[2017-06-08 15:31:23,243: INFO/SpawnPoolWorker-7] child process 9896 calling self.run()

[2017-06-08 15:31:23,245: INFO/SpawnPoolWorker-2] child process 260 calling self.run()

[2017-06-08 15:31:23,730: INFO/MainProcess] mingle: all alone

[2017-06-08 15:31:23,747: INFO/MainProcess] celery@PETRUS ready.

[2017-06-08 15:31:49,412: INFO/MainProcess] Received task: perse.tasks.celery_add[524d788e-e024-493d-9ed9-4b009315fea3]

[2017-06-08 15:31:49,416: ERROR/MainProcess] Task handler raised error: ValueError('not enough values to unpack (expected 3, got 0)',)

Traceback (most recent call last):

File "c:\program files\python36\lib\site-packages\billiard\pool.py", line 359, in workloop

result = (True, prepare_result(fun(*args, **kwargs)))

File "c:\program files\python36\lib\site-packages\celery\app\trace.py", line 518, in _fast_trace_task

tasks, accept, hostname = _loc

ValueError: not enough values to unpack (expected 3, got 0)

Fix

See pull request #4078