Closed flamechair closed 4 years ago
Also a similar error happens in set_control()
:
File "/usr/lib/python3.7/site-packages/venstarcolortouch/venstarcolortouch.py", line 242, in set_setpoints
return self.set_control()
File "/usr/lib/python3.7/site-packages/venstarcolortouch/venstarcolortouch.py", line 227, in set_control
if "success" in r.json():
File "/usr/lib/python3.7/site-packages/requests/models.py", line 889, in json
self.content.decode(encoding), **kwargs
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Yeah. Good idea. Merge request please?
Do you want me to push a new release to pypi or just wait until the next one?
I'd say cut a minor/patch release, I don't think I'm the only one that has been experiencing this.
I have pushed a 0.12 now which includes Garbled's fixes too.
https://github.com/hpeyerl/venstar_colortouch/blob/9ef092603b3fe91917b14187504ef98e5d35ecde/src/venstarcolortouch/venstarcolortouch.py#L142-L147
Maybe we should wrap the
self._info=r.json()
in a try/except?