Danielhiversen/pyRFXtrx

Error with Oregon Thermo/Hygro sensor (Exception: must be type, not classobj)

Closed this issue · 2 comments

Hello.

I am receiving the error below every time a sensor read is performed. The sensor is an Oregon THGR122N. Any ideea how to fix this? The bytes received from sensor are listed below.

Sep 16 22:14:20 pi-face start.sh[15068]: RFXTRX: Recv: 0x0a 0x52 0x01 0x01 0xcc 0x01 0x00 0xfb 0x1e 0x02 0x59
Sep 16 22:13:20 pi-face start.sh[15068]: Traceback (most recent call last):
Sep 16 22:13:20 pi-face start.sh[15068]: File "/home/haiot/PYC/sensor/rfxcom_run.py", line 87, in thread_run
Sep 16 22:13:20 pi-face start.sh[15068]: __rfx_reading(P.transport.receive_blocking())
Sep 16 22:13:20 pi-face start.sh[15068]: File "/home/haiot/PYC/sensor/RFXtrx/init.py", line 661, in receive_blocking
Sep 16 22:13:20 pi-face start.sh[15068]: return self.parse(pkt)
Sep 16 22:13:20 pi-face start.sh[15068]: File "/home/haiot/PYC/sensor/RFXtrx/init.py", line 591, in parse
Sep 16 22:13:20 pi-face start.sh[15068]: pkt = lowlevel.parse(data)
Sep 16 22:13:20 pi-face start.sh[15068]: File "/home/haiot/PYC/sensor/RFXtrx/lowlevel.py", line 70, in parse
Sep 16 22:13:20 pi-face start.sh[15068]: pkt = TempHumid()
Sep 16 22:13:20 pi-face start.sh[15068]: File "/home/haiot/PYC/sensor/RFXtrx/lowlevel.py", line 1359, in init
Sep 16 22:13:20 pi-face start.sh[15068]: super(TempHumid, self).init()
Sep 16 22:13:20 pi-face start.sh[15068]: TypeError: must be type, not classobj

I've fixed the issue replacing the code as follows:

#super(TempHumid, self).init()
SensorPacket.init(self)

Is this really an issue anymore? I just tested that event code and it doesn't seem to fail here. And i can't see anything wrong with current code.