PY3 Issue with forecast.py

109 views
Skip to first unread message

tut...@gmail.com

unread,
Oct 20, 2020, 7:37:13 PM10/20/20
to weewx-user
Hi,

I have loaded the latest Python3 version of weewx and made all the updates to forecasting, cmon, and exfoliation to get things back to "normal". However, still getting this syslog output
Oct 20 19:30:25 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 20 19:30:25 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 20 19:30:25 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 20 19:30:25 bdp-rpi1 /weewxd: forecast: ReportThread: _get_max: '>' not supported between instances of 'NoneType' and 'float'
Oct 20 19:30:25 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 20 19:30:25 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 20 19:30:25 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 20 19:30:25 bdp-rpi1 /weewxd: forecast: ReportThread: _get_max: '>' not supported between instances of 'NoneType' and 'float'
It looks to be coming from forecast.py but unsure if it is causing any real errors as there are no ignoring file or exiting error from weewx. Has anyone else seen this?

Thanks,

Bryan

John Kline

unread,
Oct 20, 2020, 7:38:57 PM10/20/20
to weewx...@googlegroups.com
What version of weewx-forecast are you using?

On Oct 20, 2020, at 4:37 PM, tut...@gmail.com <tut...@gmail.com> wrote:


--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f2b3f6ec-c71c-45d5-a8a4-c1efddb29873n%40googlegroups.com.

Bryan Peter

unread,
Oct 21, 2020, 6:47:38 PM10/21/20
to weewx...@googlegroups.com
I’m using 3.4.0b1 of forecast

Thanks,

Bryan

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/II4KJHOpkWw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/9C248808-40B1-42C5-9944-E1ACF152408A%40johnkline.com.
--

John Kline

unread,
Oct 21, 2020, 7:05:01 PM10/21/20
to weewx...@googlegroups.com

Bryan Peter

unread,
Oct 22, 2020, 7:56:58 AM10/22/20
to weewx...@googlegroups.com
Hi John,

I'm only using forecast to generate for the exfoliation skin just as a clarification. So I too k the forecast.py from the new master.zip and installed in the /user/share/weewx/user dir in my installation. I got the following syslog errors.

Oct 22 07:45:18 bdp-rpi1 /weewxd: wx_cp_index: executed /home/pi/scripts/wx_cp_index >/var/log/wx_cp_index.log 2>&1
Oct 22 07:45:21 bdp-rpi1 weewx[32073] INFO weewx.cheetahgenerator: Generated 14 files for report StandardReport in 2.29 seconds
Oct 22 07:45:22 bdp-rpi1 weewx[32073] INFO weewx.imagegenerator: Generated 12 images for report StandardReport in 0.68 seconds
Oct 22 07:45:22 bdp-rpi1 weewx[32073] INFO weewx.reportengine: Copied 0 files to /home1/var/www/weewx
Oct 22 07:45:24 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 22 07:45:24 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 22 07:45:24 bdp-rpi1 /weewxd: forecast: ReportThread: _get_max: '>' not supported between instances of 'NoneType' and 'float'
Oct 22 07:45:24 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 22 07:45:24 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 22 07:45:24 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 22 07:45:24 bdp-rpi1 /weewxd: forecast: ReportThread: _get_max: '>' not supported between instances of 'NoneType' and 'float'
Oct 22 07:45:25 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 22 07:45:25 bdp-rpi1 /weewxd: forecast: ReportThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'ZeroDivisionError'>'
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/exfoliation/forecast.html.tmpl
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: **** Reason: float division by zero
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 322, in generate
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_exfoliation_forecast_html_tmpl.py", line 351, in respond
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: ****    File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1707, in _handleCheetahInclude
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_exfoliation_forecast_iconic_inc.py", line 312, in respond
Oct 22 07:45:25 bdp-rpi1 weewx[32073] ERROR weewx.cheetahgenerator: ****  ZeroDivisionError: float division by zero
Oct 22 07:45:25 bdp-rpi1 weewx[32073] INFO weewx.cheetahgenerator: Generated 8 files for report exfoliation in 3.07 seconds
Oct 22 07:45:28 bdp-rpi1 weewx[32073] INFO weewx.imagegenerator: Generated 32 images for report exfoliation in 3.24 seconds
Oct 22 07:45:28 bdp-rpi1 weewx[32073] INFO weewx.reportengine: Copied 0 files to /home1/var/www/weewx/exfoliation

new forecast.py ignores that html.tmpl versus the original 3.4.0 forecast.py which at least generates the forecasts and both have the Typeerror issue on the _get functions for stats. So I will keep looking at it. Let me know if you have any other suggestions.

Best,

Bryan


John Kline

unread,
Oct 22, 2020, 8:16:28 AM10/22/20
to weewx...@googlegroups.com
Please don’t just take forecast.py.  There were other changes.  Do a proper install

As for the exfoliation skin, I did a port for someone a while back.  She reported success using it.  It’s here:


On Oct 22, 2020, at 4:56 AM, Bryan Peter <tut...@gmail.com> wrote:



Bryan Peter

unread,
Oct 22, 2020, 2:25:52 PM10/22/20
to weewx...@googlegroups.com
I will try that. I just don't like it because I have some customizations to exfoliation and forecast and the wee_install ain't to bright and just dumps the default file over the top and I have to hand edit the changes back in.

On exfoliation, I have done the upgrade using your suggested link, and had and done all my customizations, and it seems to work so I don't plan to do a reinstall of that.

Thanks again for your help, much appreciated.

Reply all
Reply to author
Forward
0 new messages