ooops, ignore the first couple of lines above, copy/paste error

Nigel

On Sunday, 6 September 2020 at 18:56:22 UTC+1 Devonian wrote:

> Hi Tom,
>
> Thanks, but...
>
> root@raspberrypi:/home/weewx/bin# ./wee_device --set-interval=5
> Using configuration file /home/weewx/weewx.conf
> Using WS23xx driver version 0.41 (weewx.drivers.ws23xx)
> Changing the interval will clear the station memory.
> Interval is 60
> Set interval to 5 minutes (y/n)? y
> Traceback (most recent call last):
>   File "./wee_device", line 78, in <module>
>     main()
>   File "./wee_device", line 74, in main
>     device.configure(config_dict)
>   File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in configure
>     self.do_options(options, parser, config_dict, not options.noprompt)
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 316, in do_options
>     self.set_interval(options.interval, prompt)
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 378, in set_interval
>     self.station.setArchiveInterval(interval)
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 540, in 
> setArchiveInterval
>     self.station.set_archive_interval(interval)
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 686, in 
> set_archive_interval
>     self.ws.write_safe(m.address, *cmd[1:])
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1115, in write_safe
>     command_data = self.write_data(nybble_address,nybbles,encode_constant)
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1099, in write_data
>     self.write_byte(encoded_data[i])
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1012, in write_byte
>     self.log("%02x" % six.byte2int(data))
> TypeError: 'int' object is not subscriptable
>
>
> ---------------------------------------------------------------------------------------------------------------------------
>
> root@raspberrypi:/home/weewx/bin# ./wee_device --info
> Using configuration file /home/weewx/weewx.conf
> Using WS23xx driver version 0.41 (weewx.drivers.ws23xx)
> Querying the station for the configuration...
> Traceback (most recent call last):
>   File "./wee_device", line 78, in <module>
>     main()
>   File "./wee_device", line 74, in main
>     device.configure(config_dict)
>   File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in configure
>     self.do_options(options, parser, config_dict, not options.noprompt)
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 320, in do_options
>     self.show_info()
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 326, in show_info
>     config = self.station.getConfig()
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 548, in getConfig
>     data = self.station.get_raw_data(list(Measure.IDS.keys()))
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 791, in get_raw_data
>     data_dict = dict(list(zip(labels, [m.conv.binary2value(d) for m, d in 
> zip(measures, raw_data)])))
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 791, in <listcomp>
>     data_dict = dict(list(zip(labels, [m.conv.binary2value(d) for m, d in 
> zip(measures, raw_data)])))
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1489, in 
> binary2value
>     0)) - time.timezone
> OverflowError: mktime argument out of range
>
>
> ---------------------------------------------------------------------------------------------------------------------------
>   
>
> root@raspberrypi:/home/weewx/bin# ./wee_device --clear-memory
> Using configuration file /home/weewx/weewx.conf
> Using WS23xx driver version 0.41 (weewx.drivers.ws23xx)
> Records in memory: 4
> Clear console memory (y/n)? y
> Traceback (most recent call last):
>   File "./wee_device", line 78, in <module>
>     main()
>   File "./wee_device", line 74, in main
>     device.configure(config_dict)
>   File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in configure
>     self.do_options(options, parser, config_dict, not options.noprompt)
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 318, in do_options
>     self.clear_history(prompt)
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 395, in 
> clear_history
>     self.station.clearHistory()
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 565, in clearHistory
>     self.station.clear_memory()
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 701, in clear_memory
>     self.ws.write_safe(m.address, *cmd[1:])
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1115, in write_safe
>     command_data = self.write_data(nybble_address,nybbles,encode_constant)
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1099, in write_data
>     self.write_byte(encoded_data[i])
>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1012, in write_byte
>     self.log("%02x" % six.byte2int(data))
> TypeError: 'int' object is not subscriptable
>
> Sorry for the pain !
>
> Nigel
>
>
>
> On Sunday, 6 September 2020 at 16:38:02 UTC+1 [email protected] wrote:
>
>> Looks like you found a bug when running under Python 3. Try this version 
>> of ws23xx.py.
>>
>> -tk
>>
>> On Sun, Sep 6, 2020 at 8:13 AM Devonian <[email protected]> wrote:
>>
>>> I have setup a clean install (setup.py) in Debian Buster on a R-Pi as 
>>> per this
>>> http://weewx.com/docs/setup.htm
>>> and when trying to:
>>> ./wee_device --set-interval=5
>>>
>>> I get this:
>>>
>>> Using configuration file /home/weewx/weewx.conf
>>> Using WS23xx driver version 0.41 (weewx.drivers.ws23xx)
>>> Changing the interval will clear the station memory.
>>> Interval is 60
>>> Set interval to 5 minutes (y/n)? y
>>>
>>> Traceback (most recent call last):
>>>   File "./wee_device", line 78, in <module>
>>>     main()
>>>   File "./wee_device", line 74, in main
>>>     device.configure(config_dict)
>>>   File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in configure
>>>     self.do_options(options, parser, config_dict, not options.noprompt)
>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 316, in do_options
>>>     self.set_interval(options.interval, prompt)
>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 378, in 
>>> set_interval
>>>     self.station.setArchiveInterval(interval)
>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 540, in 
>>> setArchiveInterval
>>>     self.station.set_archive_interval(interval)
>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 686, in 
>>> set_archive_interval
>>>     self.ws.write_safe(m.address, *cmd[1:])
>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1115, in 
>>> write_safe
>>>     command_data = 
>>> self.write_data(nybble_address,nybbles,encode_constant)
>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1099, in 
>>> write_data
>>>     self.write_byte(encoded_data[i])
>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1012, in 
>>> write_byte
>>>     self.log("%02x" % ord(data))
>>> TypeError: ord() expected string of length 1, but int found
>>>
>>> In fact, trying to use any wee_device command throws an error.
>>>
>>> Weewx does run and produces data/graphs, but I want 5 min intervals.
>>>
>>> Nigel
>>>
>>> -- 
>>> 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].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/77c0d927-a9a0-4bc9-b668-efd285b917e8n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/weewx-user/77c0d927-a9a0-4bc9-b668-efd285b917e8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ba6584e7-3364-46c3-ab63-ba7c8c096fden%40googlegroups.com.

Reply via email to