Skip to content

Django backend and gettext wrapper problem #58

@ruscoder

Description

@ruscoder

If I send message with subject wrapped into ugettext_lazy, PostMark backend falls down with the following error:

...
  File "/usr/local/lib/python2.7/site-packages/postmark/core.py", line 44, in default
    return super(PMJSONEncoder, self).default(o)
  File "/usr/local/lib/python2.7/site-packages/simplejson/encoder.py", line 252, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <django.utils.functional.__proxy__ object at 0x7f35c0e1fa10> is not JSON serializable

I've solved this bug locally with subject=str(subject).
I think the best solution may be wrap subject and message body into str.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions