#source code string cannot contain null bytes

2 messages · Page 1 of 1 (latest)

pseudo cypress
#

Now my manage.py scripts shwoing quirky behaviour

File "C:\Users\91773\OneDrive\Desktop\foodonlinedata-main\sanu\lib\site-packages\django\urls\exceptions.py", line 1, in <module>
from django.http import Http404
File "C:\Users\91773\OneDrive\Desktop\foodonlinedata-main\sanu\lib\site-packages\django\http_init_.py", line 9, in <module>
from django.http.response import (
File "C:\Users\91773\OneDrive\Desktop\foodonlinedata-main\sanu\lib\site-packages\django\http\response.py", line 19, in <module>
from django.core.serializers.json import DjangoJSONEncoder
ValueError: source code string cannot contain null bytes
(sanu) >>

WHY IT IS SHOWING ??

After encountering a UTF-8 decode error while running 'py manage.py loaddata file.json' during my migration from SQLite3 to PostgreSQL, I made some changes to the 'json.py' file in the site package. However, it ended up displaying Japanese characters. Additionally, when I attempted to retrieve the previous file, I couldn't find it. Therefore, I copied and pasted the 'serializer json.py' code and 'response.py' from another project. Now, all my 'manage.py' scripts are not working. Why is this happening?

pseudo cypress
#

Solved