xxxxxxxxxx
read closely, it is two different functions with very similar names. json.load() takes a file like object with a read() method, json.loads() takes a string. It's easy to miss the "s" at the end and think they are the same method. –
Joshmaker
Apr 25 '13 at 12:02
xxxxxxxxxx
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()).