NoWiresGB / RFM69GwDecoder

RFM69-Gateway Decoder
0 stars 0 forks source link

Crash with Python exception #13

Closed trizmark closed 3 years ago

trizmark commented 3 years ago

Traceback (most recent call last): File "/bin/RFM69GwToInfluxBridge.py", line 325, in main() File "/bin/RFM69GwToInfluxBridge.py", line 296, in main mqtt_client.loop_forever() File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 1779, in loop_forever rc = self.loop(timeout, max_packets) File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 1181, in loop rc = self.loop_read(max_packets) File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 1572, in loop_read rc = self._packet_read() File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 2310, in _packet_read rc = self._packet_handle() File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 2936, in _packet_handle return self._handle_publish() File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 3216, in _handle_publish self._handle_on_message(message) File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 3444, in _handle_on_message self.on_message(self, self._userdata, message) File "/bin/RFM69GwToInfluxBridge.py", line 144, in on_message measurements = _parse_mqtt_message(msg.topic, msg.payload.decode('utf-8')) File "/bin/RFM69GwToInfluxBridge.py", line 175, in _parse_mqtt_message sensType = int(sensTypeHex, 16) ValueError: invalid literal for int() with base 16: ''

trizmark commented 3 years ago

Catch exception when trying to process the packet. If exception caught: