Now save this file with “ctr+s”, and close it.Ĭome again in your terminal and give the command everything will run fine, Congratulation’s your Error is Solved. Now, Replace this line with “stream_or_string = stream_or_code(‘UTF-16’)”, Now We have added “UTF-16” like as in below fig :. “stream_or_string = stream_or_code()” in Deserializer function. Now, right click on “json.py” and open that file for edit, you could open it with Python Idle or Notepad++, as like :-Īfter opening the file come to the line :- UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xff in position 0: invalid start byte. Than press “enter”, you will see the screen like :. Than surely you have to copy :-“ C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\django\core\serializers” this path and open your “This PC” or “My Computer” and give the path like :.
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xff in position 0: invalid start byte. To open the file, copy the file path, like We have the error:-įile “C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\django\core\serializers\json.py“, line 66, in Deserializer To use ‘UTF-16’ you have to open the file which is putting error.
If ‘utf-8’ can’t decode byte, than we could use ‘UTF-16’, so now the question arise, How to use ‘UTF-16’ ! This error is saying that, at the file location on line 66, ‘utf-8’ can’t decode byte 0xff in position 0. While loading the required file, It puts error like :-įile “C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\django\core\serializers\json.py”, line 66, in Deserializer
When you give the command :- python manage.py loaddata filename.json