Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

pickle / celery breaks with exceptions  #139

Copy link
Copy link
@syphar

Description

@syphar
Issue body actions

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
wmai, datomnurdin, syphar, caelean, oldani and 14 more

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.