maxfowler
maxfowler

Reputation: 1298

dumpdata, too many arguments?

We just migrated to a new server, and dumpdata via this command (modernpolitcs is app name):

python manage.py dumpdata modernpolitics > /dump/backup.json

worked on old server, but now is not working on new server (after tying to reinstall all dependencies).

The error I'm getting is, "Error: Unable to serialize database: get_db_prep_value() takes at least 3 arguments (2 given)"

Googled the error and just found a couple 'resolved' tickets about old django development. Any ideas what the problem could be?

python 2.7.2 django 1.4

I'm able to dump one model, e.g. modernpolitics.question .. hmm

Upvotes: 3

Views: 1506

Answers (1)

get_db_prep_value() takes at least 3 arguments (2 given)

This error sounds familiar: django with multi database support takes a new connection parameter for model fields.

If you are using any third party fields or subclassed Fields they need to be updated to accept / pass this new argument.

The traceback will reveal which field is breaking.

Upvotes: 4

Related Questions