I’m working on a project that uses lots of data, and I’m using a json file to store this data.
this part of code:
with open('user_info.json') as user_file: data = json.load(user_file) #code from here and on appends info to data with open('user_info.json', 'w') as user_file: json.dump(data, user_file, indent=4)
I am getting this error:
json.decoder.JSONDecodeError: Expecting value: line 8 column 5 (char132)
the error seems to be accruing in line 14 of the code which is where I was doing this:
data = json.load(user_file)
why am I getting this error and how can I fix it?