Doesn’t sound like a python2/3 issue but rather a unit group assignment 
issue. To use the WeeWX formatting and unit conversion each WeeWX field 
needs to be assigned to to a unit group, eg outTemp is assigned to 
group_temperature so WeeWX knows that outTemp is a temperature and not a 
pressure. Unit/formatting flows from that unit group assignment. Looking at 
your weewx.conf you appear to be using a number of fields that are not in 
standard unit group assignments. That’s perfectly fine, but you then need 
to make sure you manually assign those unit groups. This can be done in a 
number of ways, sometimes it is done with a few lines of code in 
user/extensions.py or it can be done with some code in a driver or a 
service (for an example of what I am talking about see Assigning a unit 
group <http://weewx.com/docs/customizing.htm#Assigning_a_unit_group> in the 
Customization Guide). It should not be done by modifying weewx/units.py. I 
have no idea how the klimalog driver handles this, but I could certainly 
see that if it was to be done manually it could easily be lost if 
re-installing.

Gary

On Tuesday, 9 March 2021 at 17:55:50 UTC+10 lang....@googlemail.com wrote:

> Hi
>
> I made a fresh installation of weewx 4.4.0 with Python3 on Debian10 
> (Raspberry Pi).
> And I have the Klimalogg extension installed.
>
> The earlier installation was exactly the same, but ran under Python2.
>
> Use the same weewx.conf, skin.conf, index.html.tmpl and database as before.
>
> Now the sensor values show as 17.433333 instead of 17.4 °C
> respectively 46.000000 instead of 46.0 % as they did before. (see 
> attachment).
>
> and no units (like % or °C) shown any more on the snippets (graphs). 
>
> The only difference is that weewx now uses Python3 instead of Python2.
>
> I tried my best to look up the formatting in in the .conf files, but there 
> the definitions 
> look all reasonable: .%1f, .%2f
>
> degree_C            = %.1f
> degree_F            = %.1f
>
> and the labels
>
>  degree_C            = " °C"
>  degree_F            = " °F"
>
> I assume that the instructions for depiction of numbers and unit 
> denominator in
> in index.html.tmpl and skin.conf are interpreted differently under Python3.
> Or formatting follows different rules.
>
> Not being a Python expert (know other programming languages quite well 
> though),
> I'm stuck here.
>
> How to get a "proper" depiction back under Python3 ?
>
> Advice appreciated.
>
> weewx.conf, skin.conf, index.html.tmpl attached.
>
> Rainer
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/61addd0d-569a-4c92-ae6e-0597774e5820n%40googlegroups.com.

Reply via email to