I've had some time to investigate it's the forecast extension that's upsetting things. Had anyone else had this issue?
On Thursday, June 4, 2020 at 2:14:53 PM UTC+1, Mike Thompson wrote: > > Hi Fourm & Matt, > > I'm getting an issue with exfoliation to do with data types the message in > the log is "Reason: '>' not supported between instances of 'NoneType' and > 'int'" > > I've just migrated from 3.9.1 on RPI Ib running Wheezy. > Upgraded to 3.9.1 on RPI 1B running Buster with Python 2. All was working > OK > Upgraded to 4.1.1 on Python3 and the issue occurred. > As apart of the upgrade to 4.1.1 on Python3 I had to make changes to > alarm.py etc to update python2 code to python3 > Installed latest exfoliation (0.45) and forecast (3.4.0b1) extensions. > It looks like exfoliation has over written my customisations so I think > it's "out of the box" > > Seasons is working - pages and graphs generate OK. > Forecast seems to be working. Sample pages generated OK, most without data > but UK met office data on forecast-periods page. Time stamp on files in > public_html/forecast are recent i.e post upgrade. > Some Exfoliation pages are generated OK and some not, index and forecast > are not but history, almanac and links are. > > From syslog it looks like get_windspeed_trend is causing the issue > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: Generate > failed with exception '<class 'TypeError'>' > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > Ignoring template /home/weewx/skins/exfoliation/index.html.tmpl > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > Reason: '>' not supported between instances of 'str' and 'int' > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > Traceback (most recent call last): > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/cheetahgenerator.py", line 322, in generate > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > unicode_string = compiled_template.respond() > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > File "_home_weewx_skins_exfoliation_index_html_tmpl.py", line 1292, in > respond > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > File "_home_weewx_skins_exfoliation_index_html_tmpl.py", line 497, in > __errorCatcher43 > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > File "<string>", line 1, in <module> > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > File "_home_weewx_skins_exfoliation_index_html_tmpl.py", line 187, in > get_windspeed_trend > Jun 4 13:01:27 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > TypeError: '>' not supported between instances of 'str' and 'int' > from index.html.tmpl; > #def get_windspeed_trend($x) > #if $x > 0 > ⇧ > #elif $x < 0 > ⇩ > #end if > #end def > > I'm also seeing; > > Jun 4 13:01:32 weepi /weewxd: forecast: ReportThread: _get_stats: '>' not > supported between instances of 'NoneType' and 'float' > > around 50 of them followed by > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: Generate > failed with exception '<class 'TypeError'>' > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > Ignoring template /home/weewx/skins/exfoliation/forecast.html.tmpl > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > Reason: '>' not supported between instances of 'NoneType' and 'int' > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > Traceback (most recent call last): > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > File "/home/weewx/bin/weewx/cheetahgenerator.py", line 322, in generate > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > unicode_string = compiled_template.respond() > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > File "_home_weewx_skins_exfoliation_forecast_html_tmpl.py", line 384, in > respond > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1707, in > _handleCheetahInclude > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > self._CHEETAH__cheetahIncludes[_includeID].respond(trans) > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > File "_home_weewx_skins_exfoliation_forecast_table_inc.py", line 538, in > respond > Jun 4 13:01:34 weepi weewx[8650] ERROR weewx.cheetahgenerator: **** > TypeError: '>' not supported between instances of 'NoneType' and 'int' > > > It may have something to do with changes and extensions I've made over the > years. To be fair, I've just bumped along working this out from first > principles until it worked so it's highly likely I've not implemented > changes correctly > From my weewx.conf the only section regarding exfoliation is; > [[exfoliation]] > HTML_ROOT = public_html/exfoliation > skin = exfoliation > #radar_local_img = > http://radar.weather.gov/ridge/lite/N0R/BOX_loop.gif > #radar_regional_img = > http://radar.weather.gov/ridge/Conus/Loop/northeast_loop.gif > #radar_national_img = > http://images.intellicast.com/WxImages/Radar/usa.gif > > # MT Addition for forecast and alltime,sevenday > [[[CheetahGenerator]]] > search_list_extensions = user.forecast.ForecastVariables, > user.stats.MyStats > > I've run with exfoliation commented out in weewx.conf as well as > enabled=false and weewx is running without error > > Syslog attached. > before 09:35 I was running 3.9.1 on Python 2 > after 09:35 4.1.1 on python 3 > post 12:36:37 debug is turned on > > Thanks in Advance > -- 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/3f339541-107d-4791-85be-7c658b0d180co%40googlegroups.com.
