django-celery icon indicating copy to clipboard operation
django-celery copied to clipboard

"tuple index out of range" when using task_status view on task generating an exception

Open mattknoxca opened this issue 16 years ago • 1 comments

In the "task_status" view, whenever I try to call this view on a task that has generated an exception, I get a "tuple index out of range" error. Specifically, the errors occurs in the dictionary where it assigns "result": str(res.args[0])

I am not sure what "res.args" is exactly, but replacing that line with 'str(res.args[0] if res.args else "")' allows me to get the exception info as expected.

mattknoxca avatar Aug 23 '10 13:08 mattknoxca

views.task_status: Use repr() of the exception for failed tasks. Closed by 63b0d8040ee389925b0d32b77eeb556201eafa90. Thanks to mattknoxca.

ask avatar Aug 24 '10 11:08 ask