Could you try running the following under Python 3.8 and Python 2.7? Thanks!

import ctypes
from ctypes.util import find_library

libc = ctypes.CDLL(find_library('c'))
size = ctypes.c_size_t()
buf = ctypes.c_int()
size.value = ctypes.sizeof(buf)
libc.sysctlbyname("kern.boottime", ctypes.byref(buf), ctypes.byref(size),
None, 0)
os_uptime_secs = time.time() - float(buf.value)
print(os_uptime_secs)
print(buf)

-tk



On Wed, May 27, 2020 at 7:06 AM Marius Schamschula <[email protected]>
wrote:

> After some debugging, my FreeBSD server is finally running WeeWX 4.1.0
> using Python 3.8 (instead of Python 2.7). Two things
>
> 1) The server uptime is no longer correct. I, getting
>
> Weewx uptime: 0 days, 21 hours, 5 minutes
> Server uptime: 18409 days, 14 hours, 0 minutes
> weewx v4.1.0
>
> That's longer than I've had the server....
>
> It used to be correct (WeeWX 4.0.0 and below, using Python 2.7).
>
> 2) The Solar Radiation, ET and UV data and plots started showing, even
> though my VantagePro II doesn't have those sensors installed.
>
> No big deal: I've just removed these items from the template.
>
> --
> 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/9388f157-8302-499b-99da-fb99db9c1f14%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/9388f157-8302-499b-99da-fb99db9c1f14%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/CAPq0zEDUPfL_%2BvgXAVEZv8Yo_gPNF54Fo6mCEF%3D%2BKmqYAUCBpw%40mail.gmail.com.

Reply via email to