I've run into a similar problem (error: "columns app_label, model are
I've found a work-around:
- delete the database
- recreate the db from your model (using syncdb)
- edit the XML (from dumpdata), removing all but your data
(i.e. keep instances only, since your model is already in the db -
recreated by syncdb. Also, removing permissions, content-type
definitions, log.entries, etc. I.e. really just your own data)
- if you've edited with, for example, XML Notepad, change the empty
date fields from:
><None></None></field> (i.e. single line no spaces)
since django's current XML parsing seems rather untolerant (spaces and
newlines should be allowed)
- reload your data (using loaddata)
- it should be back now
- if not, try splitting your XML into chunks and load each chunk
Couple of suggestions:
- django's XML parser should really allow spaces and newlines
- it should be possible dump only your own data
- verbosity does not help for loaddata/dumpdata (no extra debug
- dumpdata should definitely insert newlines and tabs for human
- the current XML format should probably be made more generic to allow
for greater interop.
On Mar 17, 12:57 am, "Russell Keith-Magee" <freakboy3...@gmail.com>
> On 3/16/07, Jens Diemer <python_gm...
> > Generally: I have possibly wrong data in the data base. But i think
> > django does not help, to find these wrong data.
> > I made "django-admin dumpdata" and i got this error:
> > """
> > Unable to serialize database: ContentType matching query does not exist.
> > """
> > I can set "--verbosity=2", but i get no more information :(
> Well... I don't think you need much more information. I'm going to go
> out on a limb here, and say that a Content Type definintion is
> This suggests that somewhere along the line, your database got out of sync.
> Start from the beginning with a completely clean database, run syncdb,
> then serialize - does the problem go away? Then, reintroduce data
> manually and serialize. Repeat until the problem re-emerges. I suspect
> that if you start from a clean setup, the problem will go away.
> Russ Magee %-)