Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How fix error for django dumpdata "_django_curs_139705..."

Try dumpdata for my projest

python3 manage.py dumpdata > dump_12_05_2020.json

Get error. How i can fix that?

CommandError: Unable to serialize database: cursor "_django_curs_139705045542656_66" does not exist
like image 314
Сергей Потапов Avatar asked Nov 07 '22 07:11

Сергей Потапов


1 Answers

I had the same error message pop up when trying to datadump.

For what it's worth: in my case, I had some things messed up in my database. Some postgres tables not linked to models in django, and some models in django that had no tables in postgres. When I removed the tables not linked to models and the models not linked to tables, datadump went fine.

like image 124
MSDMMM Avatar answered Nov 15 '22 06:11

MSDMMM