AttributeError(“‘str’ object has no attribute ‘read'”)

The problem is that for json.load you should pass a file like object with a read function defined. So either you use json.load(response) or json.loads(response.read()).

Leave a Comment