Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dumpdata, too many arguments?

Tags:

django

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

like image 640
maxfowler Avatar asked Sep 09 '26 21:09

maxfowler


1 Answers

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.

like image 65
Yuji 'Tomita' Tomita Avatar answered Sep 12 '26 04:09

Yuji 'Tomita' Tomita



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!