8π
β
It seems that what you are trying to serialise are not strings β they are lazy translation objects (i.e. strings marked for translation, that has not been evaluated yet).
Most likely there is a line in the same file similar to this one:
from django.utils.translation import ugettext_lazy as _
to use a translation function that is not lazy (i.e. it returns translated strings and not lazy translation objects) you should change it to:
from django.utils.translation import ugettext as _
Alternatively you can force evaluation of lazy translation objects before serialising them by calling str()
on them.
π€Ludwik Trammer
Source:stackexchange.com