Skip to content

pickle / celery breaks with exceptions  #139

Closed

Description

@syphar

Issue Summary

We are using this library in a celery background task, using celery. (through the sendgrid library, and actually django-celery-email).

When errors happen with the sendgrid API (like a BAD REQUEST), celery can handle this exception and normally pickle it to return it to the caller.

Currently we are seeing a PicklingError where the exception type from this library can be pickled.

As seen in this issue the problem is that in the custom exception types super() is not called.

Exception/Log

line breaks added for readability

ERROR [none] celery.worker.request: 
Task handler raised error: <MaybeEncodingError: Error sending result: 
''(1, <ExceptionInfo: BadRequestsError("<HTTPError 400: \'Bad Request\'>",)>, None)''. 
Reason: ''PicklingError("Can\'t pickle 
<class \'python_http_client.exceptions.BadRequestsError\'>: it\'s not 
the same object as python_http_client.exceptions.BadRequestsError",)''.>

Technical details:

  • python-http-client version: 3.2.1
  • python version: 3.6.10

Activity

  1. added
    difficulty: easy
    status: help wanted
    type: community enhancement
    on Feb 5, 2020
  2. childish-sambino commented on Mar 10, 2020

    @childish-sambino
    Contributor

    This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

  3. wmai commented on Apr 5, 2020

    @wmai

    +1

  4. oldani commented on May 26, 2020

    @oldani

    +1

  5. caelean commented on Jun 10, 2020

    @caelean

    +1

  6. childish-sambino commented on Jun 16, 2020

    @childish-sambino
    Contributor

    +1s on the issue summary

    We don't track +1s on comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: easystatus: help wantedtype: community enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions