celery.chord gives IndexError: list index out of range error in celery version 3.0.19
This is an error that occurs when a chord header has no tasks in it. Celery tries to access the tasks in the header using self.tasks[0] which results in an index error since there are no tasks in the list.
Has anyone seen this error in celery (a distribute task worker in Python) before?
Traceback (most recent call last):
  File "/home/mcapp/.virtualenv/lister/local/lib/python2.7/site-packages/celery/task/trace.py", line 228, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/mcapp/.virtualenv/lister/local/lib/python2.7/site-packages/celery/task/trace.py", line 415, in protected_call
    return self.run(*args, **kwargs)
  File "/home/mcapp/lister/lister/tasks/init.py", line 69, in update_playlist_db
    video_update(videos)
  File "/home/mcapp/lister/lister/tasks/init.py", line 55, in video_update
    chord(tasks)(update_complete.s(update_id=update_id, update_type='db', complete=True))
  File "/home/mcapp/.virtualenv/lister/local/lib/python2.7/site-packages/celery/canvas.py", line 464, in call
    _chord = self.type
  File "/home/mcapp/.virtualenv/lister/local/lib/python2.7/site-packages/celery/canvas.py", line 461, in type
    return self._type or self.tasks[0].type.app.tasks['celery.chord']
IndexError: list index out of range
This particular version of celery is 3.0.19, and happens when the celery chord feature is used.  We don't think there is any error in our application, as 99% of the time our code works correctly, but under heavier loads this error would happen.  We are trying to find out if this is an actual bug in our application or a celery bug, any help would be greatly appreciated.