When I run the following command to export my database in a JSON file :
python manage.py dumpdata > datadump.json
I have the following error message :
CommandError: Unable to serialize database: invalid literal for int() with base 10: b'19 22:00:00'
I think that at a moment the command tries to convert a part of a datetime to an integer and fails, but I don't understand why such a thing appears.
Any help will be appreciate,
thanks
I think there is some data inconsistently stored in the database. You should check that column data to make sure.
For what I encountered, I had my date column saving data like '2020-01-07', but during another process of adding data, the data was added as '2020/04/03'. I was not aware, but it was successfully stored in the database. I thus got the same error as you, only that my error is
b'2020/04/03'.