Django Dumpdata Error Unable To Serialize Database
The answers you seek can be partially found by reading the ticket history. The ticket *was* DDN until it was marked 'Fixed on a branch' by an anonymous user (who also marked it for milestone 1.3). Since the anonymous person didn't give any explanation, you can probably assume that that update was spam.
That means the ticket is waiting on a design decision. A patch has been provided; that patch isn't a diff against trunk, and it doesn't include tests. It also introduces a new management command, but includes no documentation for that management command. Assuming that the patch is the right fix, the patch isn't ready for trunk because of these missing elements. However, I'm not convinced the patch is the right approach.
We already have a 'find the errors' command -- it's called validate. I don't see the use case for an additional management command to catch serialization errors. In any case, blank=True without null=True shouldn't pose a serialization problem, but the reporter doesn't provide a clear test case to validate the problem they describe. Given that this problem was reported 3 years ago, there have been many improvements in serialization error reporting since that time, and many edge cases caught in serialization since then, I'm going to close this needsinfo. Download Facebook For Nokia 3500 Classic here. If someone can verify that this is still a problem, feel free to reopen, providing a specific reproduction test case. I encountered this exact same problem with Django 1.3 when working with some legacy data.
Whilst validate returned no errors, dumpdata reported the error 'Space matching query does not exist.' The problem was that the legacy data allowed a value of 0 for a blank foreign key, instead of NULL.
Django was (logically) unable to match the ID 0 to an existing foreign row. To fix the issue, I updated the legacy data to use NULL instead of 0 for blank foreign keys. I agree that the error message could be more explicit or maybe validate could catch these types of problems? Replying to: I encountered this exact same problem with Django 1.3 when working with some legacy data. The Economics Of European Integration Baldwin Ebook Login. Whilst validate returned no errors, dumpdata reported the error 'Space matching query does not exist.'

The problem was that the legacy data allowed a value of 0 for a blank foreign key, instead of NULL. Django was (logically) unable to match the ID 0 to an existing foreign row.
To fix the issue, I updated the legacy data to use NULL instead of 0 for blank foreign keys. I agree that the error message could be more explicit or maybe validate could catch these types of problems?
A simple, bare, (without the brackets) in place of a 0 for null foreign key properties in an import json fixture will also take care of the problem.
I really need to dump this data back out as JSON. Your only possibility is to find the records by hand, f.e. Blank=True allows you to leave the the field empty in a model form (eg. Removing them allowed me to create my Django fixtures.