Issue 1:
Checklist

[ x] I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

[ x] I have checked the commit log

to find out if the bug was already fixed in the master branch.

[x ] I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Description

Following the First Steps tutorial all goes well

Until I execute the command

$ celery -A tasks worker --loglevel=info

I get the following traceback I go to the trouble shooting section and no mention of how to deal with this error is mentioned. Could the documentation please be updated to include such information, Note that a cursory attempt at debugging revealed that executing the command

$ celery resulted in the same traceback error.

Traceback (most recent call last):

File "/home/chuck/.local/bin/celery", line 8, in

sys.exit(main())

File "/home/chuck/.local/lib/python2.7/site-packages/celery/main.py", line 15, in main

from celery.bin.celery import main as _main

File "/home/chuck/.local/lib/python2.7/site-packages/celery/bin/init.py", line 2, in

from .base import Option

File "/home/chuck/.local/lib/python2.7/site-packages/celery/bin/base.py", line 16, in

from celery import VERSION_BANNER, Celery, maybe_patch_concurrency, signals

File "/home/chuck/.local/lib/python2.7/site-packages/celery/signals.py", line 16, in

from .utils.dispatch import Signal

File "/home/chuck/.local/lib/python2.7/site-packages/celery/utils/init.py", line 8, in

from .functional import memoize # noqa

File "/home/chuck/.local/lib/python2.7/site-packages/celery/utils/functional.py", line 10, in

from kombu.utils.functional import (LRUCache, dictfilter, is_list, lazy,

File "/home/chuck/.local/lib/python2.7/site-packages/kombu/utils/init.py", line 5, in

from .compat import fileno, maybe_fileno, nested, register_after_fork

File "/home/chuck/.local/lib/python2.7/site-packages/kombu/utils/compat.py", line 10, in

import importlib_metadata

File "/home/chuck/.local/lib/python2.7/site-packages/importlib_metadata/init.py", line 9, in

import zipp

File "/home/chuck/.local/lib/python2.7/site-packages/zipp.py", line 12, in

import more_itertools

File "/home/chuck/.local/lib/python2.7/site-packages/more_itertools/init.py", line 1, in

from more_itertools.more import * # noqa

File "/home/chuck/.local/lib/python2.7/site-packages/more_itertools/more.py", line 340

def _collate(*iterables, key=lambda a: a, reverse=False):

^

SyntaxError: invalid syntax

)

Suggestions

Please include the appropriate troubleshooting guidelines.

Issue 2:
Checklist

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 included all related issues and possible duplicate issues in this issue.

I have included the contents of pip freeze in the issue.

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

I have tried reproducing the issue on more than one message broker and/or result backend.

I have tried reproducing the issue on more than one workers pool.

I have tried reproducing the issue with retries, ETA/Countdown & rate limits disabled.

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Environment & Settings

Celery version: 4.2.1 (windowlicker)

celery report Output:

software -> celery:4.2.1 (windowlicker) kombu:4.2.1 py:3.6.4
billiard:3.5.0.4 redis:2.10.6
platform -> system:Darwin arch:64bit imp:CPython
settings -> transport:redis results:redis://localhost/

BROKER_URL: 'redis://localhost:6379//'
CELERY_RESULT_BACKEND: 'redis://localhost/'
BROKER_TRANSPORT_OPTIONS: {
'visibility_timeout': 11700}

Tried this with RabitMQ also. Same issue exists.

Steps to Reproduce

If I create a celery canvas with a task - grouptask - task - task - grouptask - task, it fails.

If I change it to task - grouptask - task - grouptask - task, it works

Minimally Reproducible Test Case

@celery_app.task
def print_task(val):
print("Running print_task. val is: {}".format(val))

final_task = celery.chain(
print_task.si(val="Starter task"),
celery.group([
print_task.si(val='group1, task1'),
print_task.si(val='group1, task2'),
]),
print_task.si(val="group1, after-task"),
print_task.si(val="group1, after-task2"), # <---- commenting this makes it work
celery.group([
print_task.si(val='group2, task1'),
print_task.si(val='group2, task2'),
]),
print_task.si(val="FINAL task"),
)
r = final_task()
print(r.get())

Also, when we do a print(final_task), it shows:

print_task(val='Starter task')
| %(print_task([
print_task(val='group1, task1'),
print_task(val='group1, task2')
], val='group1, after-task')
| print_task(val='group1, after-task2')
) | %print_task([
print_task(val='group2, task1'),
print_task(val='group2, task2')
], val='FINAL task')

Required Dependencies

Minimal Python Version: Python 3.6.4 :: Anaconda, Inc.

Minimal Broker Version: Redis 4.0.9

Minimal Result Backend Version: Redis 4.0.9

Minimal OS and/or Kernel Version: Mac OSX 10.13, Linux CentOS7

Minimal Broker Client Version: N/A or Unknown

Minimal Result Backend Client Version: N/A or Unknown

I've also tried with latest git master versions of celery, kombu, amqp, redis-py, vine.

Expected Behavior

The output should have executed the entire canvas:

Running print_task. val is: Starter task
Running print_task. val is: group1, task1
Running print_task. val is: group1, task2
Running print_task. val is: group1, after-task
Running print_task. val is: group1, after-task2
Running print_task. val is: group2, task1
Running print_task. val is: group2, task2
Running print_task. val is: FINAL task

Actual Behavior

The tasks until group1, after-task2 work fine. The group1, after-task2 also completes execution according to celery logs.

Running print_task. val is: Starter task
Running print_task. val is: group1, task1
Running print_task. val is: group1, task2
Running print_task. val is: group1, after-task
Running print_task. val is: group1, after-task2
[2019-02-22 16:30:18,041: INFO/MainProcess] Task print_task[beaea403-5f2e-4b84-8f64-bcada7c07000] succeeded in 0.004693654947914183s: None

The redis-cli shows that is completed too:

127.0.0.1:6379> get celery-task-meta-beaea403-5f2e-4b84-8f64-bcada7c07000
"{\"status\": \"SUCCESS\", \"result\": null, \"traceback\": null, \"children\": [], \"task_id\": \"beaea403-5f2e-4b84-8f64-bcada7c07000\"}"

But for some reason, the children is empty - even though there are children.