Python error load JSON code of google API
The error arises because the “data” is of type bytes so you have to decode it into a string before using json.loads to turn it into a json object. So to solve the problem: Also, str(data) in the code you share will work in Python 2.x but not in Python 3.x because str() doesn’t turn bytes into … Read more