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

MaybeEncodingError - async Work

Open ramibch opened this issue 3 years ago • 0 comments

I run into an Error using django-tex with celery and celery results. The error was:

[2022-03-21 21:25:10,946: ERROR/MainProcess] Task handler raised error: <MaybeEncodingError: Error sending result: ''(1, <ExceptionInfo: TexError()>, None)''. Reason: ''PicklingError("Can't pickle <class 'django_tex.exceptions.TexError'>: it's not the same object as django_tex.exceptions.TexError")''.>

By adding this line of code at the end of the TexError.init method, the issue it is solved:

super(TexError, self).__init__(log, source, template_name)

Check following issue for more: https://github.com/celery/celery/issues/3623 https://github.com/celery/celery/issues/3623#issuecomment-264564267

ramibch avatar Mar 21 '22 21:03 ramibch