For my website in Python, before changing my database from SQLite to MySQL I saved it as a JSON file :
python manage.py dumpdata > datadump.json
Then I changed my settings.py to the MySQL database to migrate it:
python manage.py loaddata datadump.json
But it causes this error:
File "C:\Users\M.Hawa\Desktop\My_Django_Stuff\firstproject\deneme\lib\site-packages\django\core\serializers\json.py", line 67, in Deserializer
stream_or_string = stream_or_string.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x99 in position 5289: invalid start byte
I tried to change :
stream_or_string = stream_or_string.decode()
To:
stream_or_string = stream_or_string.decode("UTF-16")
But it did not work.