Very nice tutorial. I have been following it to modify my project, but unable to create a new entry in the database. I am getting the following error:
raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
It is evoked by the line: payload = json.loads(request.body)
Any idea what I am doing wrong? I have tried a few fixes but no help.
Your request.body is not a JSON format, it's probably a serialized string.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Very nice tutorial. I have been following it to modify my project, but unable to create a new entry in the database. I am getting the following error:
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
It is evoked by the line:
payload = json.loads(request.body)
Any idea what I am doing wrong? I have tried a few fixes but no help.
Your request.body is not a JSON format, it's probably a serialized string.