I've been using your client to update Domoticz which was working great until this morning. I had to do a little digging to find out why but it just turns out the site was down. I'd only just started using it so I thought it could be something else. It would be nice if there was some more error handling to help understand what is happening.
Typical error...
File "evohome-client/evohomeclient2/__init__.py", line 13, in __init__
self._login()
File "evohome-client/evohomeclient2/__init__.py", line 43, in _login
self.access_token = self._convert(r.text)['access_token']
File "evohome-client/evohomeclient2/__init__.py", line 16, in _convert
return json.loads(self.reader(object)[0])
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
Obviously it turns out object doesn't contain valid json which is why it's throwing a fit...
I've been using your client to update Domoticz which was working great until this morning. I had to do a little digging to find out why but it just turns out the site was down. I'd only just started using it so I thought it could be something else. It would be nice if there was some more error handling to help understand what is happening.
Typical error...
Obviously it turns out object doesn't contain valid json which is why it's throwing a fit...
Exert of the HTML in object....
There was an alternate error (sorry lost the traceback) the html looked like....
May handle the exception, print object and return an error code so we can do respond?
Also I understand there was another site so I don't know if it would be possible to have a site list and try both