Exporting the database data using ./manage.py dumpdata [app[.model]] -o output.json
Loading the fixture data back into the database using ./manage.py loaddata output.json
Error Stack
File "python3.7/site-packages/django/core/management/commands/loaddata.py", line 72, in handle
self.loaddata(fixture_labels)
File "python3.7/site-packages/django/core/management/commands/loaddata.py", line 114, in loaddata
self.load_label(fixture_label)
File "python3.7/site-packages/django/core/management/commands/loaddata.py", line 172, in load_label
for obj in objects:
File "python3.7/site-packages/django/core/serializers/json.py", line 69, in Deserializer
yield from PythonDeserializer(objects, **options)
File "python3.7/site-packages/django/core/serializers/python.py", line 145, in Deserializer
raise base.DeserializationError.WithData(e, d['model'], d.get('pk'), field_value)
django.core.serializers.base.DeserializationError: Problem installing fixture 'dump.json': ["'1.0 kg' value must be a float."]: (myapp.mymodel:pk=7) field_value was '1.0 kg'
Steps
./manage.py dumpdata [app[.model]] -o output.json
./manage.py loaddata output.json
Error Stack