Django Dumpdata Error Unable To Serialize Database
I'm getting an error when I'm trying to dump data to a JSON fixture in Djanog 1.2.1 on my live server. The Copyrights Learn The Hard Way Zip 213. On the live server it's running MySQL Server version 5.0.77 and I imported a lot of data to my tables using the phpMyAdmin interface.
Apr 11, 2007 I'm playing with django.core. I made 'django-admin dumpdata' and i got this error: '' Unable to serialize database. (1) sudo /usr/local/hue/build/env/bin/hue dumpdata >/tmp/hue_db_dump.json; CommandError: Unable to serialize database: (1146, 'Table. INSTALLED_APPS; File '/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/conf/__init__.py', line 54, in __getattr__; self.
The website works fine and Django admin responds as normal. But when I try and actually dump the data of the application that corresponds to the tables I get this error: $ python manage.py dumpdata --indent=2 gigs >fixtures/gigs_100914.json /usr/local/lib/python2.6/site-packages/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet Error: Unable to serialize database: Location matching query does not exist. I once ran in a similar problem where the error message was as mesmerizing as yours. The cause was a lack of memory on my server. It seems that generating dumps in json is quite memory expensive. I had only 60meg of memory (at djangohosting.ch) and it was not enough to get a dump for a mysql DB for which the mysql dump was only 1meg.
I was able to find out by watching the python process hit the 60meg limit using the top command in a second command line while running manage.py dumpdata in a first one. My solution: get the mysql dump and then load it on my desktop pc, before generating the json dump. That said, for backup purposes, the mysql dumps are enough.
The command to get a mysql dump is the following: mysqldump -p [password] -u [username] [database_name] >Mcdsp Emerald Pack Torrent Mac Office. [dump_file_name].sql That said, your problem could be completely different. You should really look at every table that has a foreign key to your Location table, and check if there is no field pointing to a previously deleted location. Unfortunately MySQL is very bad at maintaining Referential integrity, and you cannot count on it.