Skip to content

Fix registration bug #1

@astrorafael

Description

@astrorafael

2021-06-25T05:37:01+0000 [MQTTProtocol,client] Unhandled Error
Traceback (most recent call last):
File "/home/rfg/stars4all/lib64/python3.6/site-packages/twisted/python/log.py", line 103, in callWithLogger
raise
File "/home/rfg/stars4all/lib64/python3.6/site-packages/twisted/python/log.py", line 86, in callWithContext

      File "/home/rfg/stars4all/lib64/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext

      File "/home/rfg/stars4all/lib64/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext
        self.contexts.pop()
    --- <exception caught here> ---
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
        def removeAll(self):
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/twisted/internet/tcp.py", line 243, in doRead
        else:
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/twisted/internet/tcp.py", line 249, in _dataReceived
        if not data:
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/twisted/internet/endpoints.py", line 132, in dataReceived
        """
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/mqtt/client/base.py", line 509, in dataReceived
        self._accumulatePacket(data)
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/mqtt/client/base.py", line 332, in _accumulatePacket
        self._processPacket(chunk)
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/mqtt/client/base.py", line 358, in _processPacket
        packetDecoder(packet)
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/mqtt/client/base.py", line 437, in _handlePUBLISH
        self.state.handlePUBLISH(response)
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/mqtt/client/subscriber.py", line 67, in handlePUBLISH
        self.protocol.handlePUBLISH(response)
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/mqtt/client/pubsubs.py", line 245, in handlePUBLISH
        self._deliver(response)
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/mqtt/client/pubsubs.py", line 484, in _deliver
        self.onPublish(pdu.topic, pdu.payload, pdu.qos, pdu.dup, pdu.retain, pdu.msgId)
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/tessdb/mqttservice.py", line 400, in onPublish
        self.handleRegistration(row, now)
      File "/home/rfg/stars4all/lib64/python3.6/site-packages/tessdb/mqttservice.py", line 287, in handleRegistration
        if type(row['calib']) == int:
    builtins.KeyError: 'calib'

2021-06-25T05:37:01+0000 [tessdb.mqttservice.MQTTService#info] Scheduling retry 1 to connect <twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7fb0c4708470> in 8.891547614637352 seconds.
2021-06-25T05:37:01+0000 [mqtt.client.factory.MQTTFactory#info] Stopping factory <mqtt.client.factory.MQTTFactory object at 0x7fb0c47082e8>
2021-06-25T05:37:01+0000 [mqttS#warn] tessdb lost connection with its MQTT broker
2021-06-25T05:37:10+0000 [mqtt.client.factory.MQTTFactory#info] Starting factory <mqtt.client.factory.MQTTFactory object at 0x7fb0c47082e8>
2021-06-25T05:37:10+0000 [mqttS#info] no need to unsubscribe
2021-06-25T05:37:10+0000 [mqttS#info] Subscribing to topics=[('STARS4ALL/register', 2), ('STARS4ALL/+/reading', 2)]
2021-06-25T05:37:10+0000 [mqttS#info] Connected and subscribed to

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions