ValueError: no json object could be decoded (Head First Python-chapter 8)

32 views Asked by At

I'm new to python and I'm learning using Head First Python. I've gotten to chapter 8 and I'm stuck with the error message above. After writing the coachapp.py script given by the book and uploading it onto android emulator device, I'm stuck with this error message. I have been at it for weeks now. The error comes from this line of code:

athlete = json.loads(send_to_server(web_server + get_data_cgi, {'which_athlete': which_athlete}))

...although my web server-log indicates that the data has been sent successfully:

b'{"Name": "James Lee", "DOB": "2002-3-14", "Top3": ["2.01", "2.16", "2.22"]}\r\n'

0

There are 0 answers