On 07/05/2023, Jarmo Seppänen <jarmo.t.seppa...@gmail.com> wrote:
> Thank you Glen for the hints.
> I got it working.
> When I added unit_system = METRICWX to StdReport the error disappeared.
> Perhaps the best place for it would be in
> [StdRESTful]
> [[Mastodon]]
> ...
> unit_system = US, METRIC, METRICWX
> if that is possible as that way one could configure it for Mastodon only.

Yep. Sounds like a good fallback solution.
I'll still keep the original as it should be there in a standard
install , and it still exists in that location with Weewx v5;  but I
will set that location as a 'report specific' option - which it
probably should have anyway.

[...]

> Oh, one thing I discovered when trying to report the UV readings.
> I got an error:
> weewx[30835] CRITICAL weewx.restx: Mastodon: Thread terminating. Reason:
> can only concatenate str (not "NoneType") to str
> After digging around I noticed that in file
> /home/weewx/bin/user/wxtoot.py in line 481
> 'uv_index': 'None', was causing the issue.
> I changed it to:
> 'uv_index': '',

You are correct. There is no unit for UV so '"" covers it.

> As I'm a lousy developer I don't know if this breaks something else but at
> least "it works for me" :)

It is the fix, and consider yourself a value adding bug reporter. :)
That feedback is always appreciated.

> Perhaps you can take a look at that too for the coming releases.

Indeed I will.

-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAzgv-sZ-AD4h2EjXvDiHAhhjP6eCMVwbsKAFPKH2SjHR%3DQ%40mail.gmail.com.

Reply via email to