As the subject says, I have a legacy database that stored binary blobs within the database. I'm working to do a data migration, running dumpdata without any issues, but when I try to loaddata it always fails with a django.core.serializers.base.DeserializationError: Problem installing fixture 'data.json': Incorrect padding: error. As best I can tell this is related to Django b64 encoding the binary field and then trying to restore it.

I've tested it by b64 encoding the field myself and there is no issue with the field contents, any thoughts if the problem is with dumpdata or loaddata and how it might be solved?


Your Answer


Browse other questions tagged or ask your own question.