On Wednesday, March 27, 2019 at 4:35:44 PM UTC-4, Ron wrote:
>
>
> Mar 26 20:02:17 AllenWeather weewx[7839]:     ****    File 
>>> "/usr/share/weewx/user/HP1000.py", line 524, in genLoopPackets
>>
>> Mar 26 20:02:17 AllenWeather weewx[7839]:     ****      interp_data = 
>>> struct.unpack("8s8s16s8shbb14fbbh", rxData)
>>
>> Mar 26 20:02:17 AllenWeather weewx[7839]:     ****  error: unpack 
>>> requires a string argument of length 104
>>
>> Mar 26 20:02:17 AllenWeather weewx[7839]:     ****  Exiting.
>>>
>>
this is a bug in the HP1000.py driver.  the driver received some data, but 
it was not the type/structure that it expected, and the code does not know 
how to deal with what it actually received.

as a workaround, you could change line 524 of HP1000.py from this:

                interp_data = struct.unpack("8s8s16s8shbb14fbbh", rxData)

to this:

                try:
                    interp_data = struct.unpack("8s8s16s8shbb14fbbh", 
rxData)
                except struct.error as e:
                    network_retry_count -= 1
                    if network_retry_count > 0:
                        sleep(self.retry_wait)
                        self.ws_socket.close()
                        self.ws_socket = None
                        continue
                    else:
                        raise weewx.RetriesExceeded

but for a proper fix the driver auther (susan mackay) should look at it in 
more detail.

m 

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to