Wind compass None - different handling in v4.3 from v3.9.2?

45 views
Skip to first unread message

Copain

unread,
Jan 27, 2021, 3:40:14 PM1/27/21
to weewx-development
I appreciate all efforts that go into the development of this software and would like to thank the involved people very much.

In weewx v3.9.2 reports are showing N/A, if wind compass is None. In some reports, I am testing for None with {if $day.wind.vecdir.ordinal_compass <> "N/A"}. I found this to be the only working solution at the time.

Now, after a fresh install and upgrading to weewx v4.3 with python 3.7.3, this results in a syntax error.

It seems that the handling has changed in the meantime? How should I check for None values in weewx v4.3?

Thank you.

Tom Keffer

unread,
Jan 27, 2021, 4:04:36 PM1/27/21
to weewx-development
The problem has nothing to do with WeeWX, but rather changes in Python3. The syntax '<>' is no longer accepted. Use '!=' instead.

But, why not test directly for None? Use

#if $day.wind.vecdir.raw is not None:
  do something...
#end if




--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/fa1af3f7-685a-4423-94b8-857fc7efe0c2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages