Format error in log - string rather than float

37 views
Skip to first unread message

Dan Roman

unread,
Oct 6, 2023, 2:35:12 PM10/6/23
to weewx-user
I am receiving the error below in the log.

Oct  5 05:00:38 pimatrix weewx[688] INFO user.belchertown: Observation lightning_strike_count is using unit count that returns %d for StringFormat, rather than float point decimal format value - using 0 as rounding

lightning_strike_count is assigned in weewx.conf here:

lightning_strike_count = lightning_strike_count.ST-00102080.obs_st

Not sure where I should be looking to resolve the disconnect, in weewx or the Belchertown skin.  I don't see anything in weewx.conf or graphs.conf or skin.conf that lets me specify if a value is a string or float.

Thanks.

Greg Troxel

unread,
Oct 6, 2023, 2:40:50 PM10/6/23
to Dan Roman, weewx-user
Dan Roman <gdan...@gmail.com> writes:

> I am receiving the error below in the log.
>
> Oct 5 05:00:38 pimatrix weewx[688] INFO user.belchertown: Observation
> lightning_strike_count is using unit count that returns %d for
> StringFormat, rather than float point decimal format value - using 0 as
> rounding

That's not an error. It's "INFO". It's pointing out that because
lightning_strike_count is in units of "count", which is fundementally
non-negative integers,rather than something which would be expected to
take on real values, that it is not rounding.

One could say that it's an error to print this INFO, as it seems
entirely appropriate for lightning_strike_count to be a count.

> lightning_strike_count is assigned in weewx.conf here:
>
> lightning_strike_count = lightning_strike_count.ST-00102080.obs_st
>
> Not sure where I should be looking to resolve the disconnect, in weewx or
> the Belchertown skin. I don't see anything in weewx.conf or graphs.conf or
> skin.conf that lets me specify if a value is a string or float.

I think one sets the unit and the rest flows from that.

To me, the thing to fix is to suppress the message. But read the code;
perhaps there is a comment near it that explains why it makes sense.

Reply all
Reply to author
Forward
0 new messages