PieterVO / EvohomeTemperature

Log Evohome temperature using Plotly
7 stars 5 forks source link

Error when running script : the JSON object must be str, not 'bytes' #1

Closed kvandenbogaerde closed 9 years ago

kvandenbogaerde commented 9 years ago

Hi,

When I run this script underPython34, I get an error on userinfo = json.loads(response.content) : the JSON object must be str, not 'bytes'.

How can this be solved ?

Best regards, Kristof

ukdilmah commented 9 years ago

I have fixed this - you need to add ".decode('utf-8')" in lines 46 and 78:

fullData = json.loads(response.content.decode('utf-8'))[0]

PieterVO commented 9 years ago

Sorry for the late reaction. I fixed the issue, thank you @ukdilmah!