sincze / Domoticz-Growatt-Webserver-Plugin

16 stars 10 forks source link

Call to function 'onMessage' failed ( json.decoder.JSONDecodeError: Expecting value) #30

Closed bertinholland closed 1 year ago

bertinholland commented 1 year ago

After many month with no errors today there is no data received anymore for "Zonnepanelen".

Domoticz 2022.2 (updated a few days ago) on raspberry pi Version: 2022.2 Build Hash: eea9db734 Compile Date: 2022-11-05 13:05:35 dzVents Version: 3.1.8 Python Version: 3.7.3 (default, Oct 31 2022, 14:04:00) [GCC 8.3.0]

Cab you please advice me what to do? Any tips or tricks. Thanks in advance.

LOGFILE: 2022-11-20 11:17:09.832 Error: Zonnepanelen: Call to function 'onMessage' failed, exception details: 2022-11-20 11:17:09.848 Error: Zonnepanelen: Traceback (most recent call last): 2022-11-20 11:17:09.848 Error: Zonnepanelen: File "/home/pi/domoticz/plugins/Domoticz-Growatt-Webserver-Plugin.nieuweinstall/plugin.py", line 275, in onMessage 2022-11-20 11:17:09.848 Error: Zonnepanelen: _plugin.onMessage(Connection, Data) 2022-11-20 11:17:09.848 Error: Zonnepanelen: File "/home/pi/domoticz/plugins/Domoticz-Growatt-Webserver-Plugin.nieuweinstall/plugin.py", line 172, in onMessage 2022-11-20 11:17:09.848 Error: Zonnepanelen: apiResponse = json.loads(strData) 2022-11-20 11:17:09.848 Error: Zonnepanelen: File "/usr/lib/python3.7/json/init.py", line 348, in loads 2022-11-20 11:17:09.848 Error: Zonnepanelen: return _default_decoder.decode(s) 2022-11-20 11:17:09.848 Error: Zonnepanelen: File "/usr/lib/python3.7/json/decoder.py", line 337, in decode 2022-11-20 11:17:09.848 Error: Zonnepanelen: obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 2022-11-20 11:17:09.848 Error: Zonnepanelen: File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode 2022-11-20 11:17:09.848 Error: Zonnepanelen: raise JSONDecodeError("Expecting value", s, err.value) from None 2022-11-20 11:17:09.848 Error: Zonnepanelen: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 2022-11-19 22:41:29.248 Error: Zonnepanelen: obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 2022-11-19 22:41:29.248 Error: Zonnepanelen: File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode 2022-11-19 22:41:29.248 Error: Zonnepanelen: raise JSONDecodeError("Expecting value", s, err.value) from None 2022-11-19 22:41:29.248 Error: Zonnepanelen: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

sincze commented 1 year ago

Seems to be working with this fix if somebody can confirm I can update the plugin: https://github.com/sincze/Domoticz-Growatt-Webserver-Plugin/issues/29#issuecomment-1321133498

sincze commented 1 year ago

Merged into V1.0.1