Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lacking compatibility with lazy-translated strings #66

Open
jayhale opened this issue Sep 18, 2017 · 0 comments
Open

Lacking compatibility with lazy-translated strings #66

jayhale opened this issue Sep 18, 2017 · 0 comments

Comments

@jayhale
Copy link

jayhale commented Sep 18, 2017

When preparing the HTTP POST request for sending email via the API, JSON serialization fails when attempting to serialize django.utils.functional.__proxy__ objects (strings that have yet to be translated).

Potential wrap-around fix is to force JSON encoding with an encoder that forces all objects to unicode before attempting to serialize.

Error encountered:

TypeError: Object of type '__proxy__' is not JSON serializable

Source of the issue:

# sgbackend/mail.py line 68, in send_messages:
    self.sg.client.mail.send.post(request_body=mail)

Similar issues:
ryanbagwell/django-cms-named-menus#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant