I changed the first one and all my errors went away.  I’m not sure I was having 
the second part of the error.

 

 

Thanks,

Scott KB2EAR

http://weather.kb2ear.net/exfoliation

 

 

From: weewx-user@googlegroups.com <weewx-user@googlegroups.com> On Behalf Of 
Tom Keffer
Sent: Saturday, July 11, 2020 6:07 PM
To: weewx-user <weewx-user@googlegroups.com>
Subject: Re: [weewx-user] Issue with exfoliation weewx 4.1.1 and python3 - I 
think?

 

For the first error, in file index.html.tmpl, line 226, change this

 

#if $varExists('trend') and $trend.windSpeed.raw is not None

      $get_windspeed_trend($trend.windSpeed.formatted)

#end if

 

to this

 

#if $varExists('trend') and $trend.windSpeed.raw is not None

      $get_windspeed_trend($trend.windSpeed.raw)

#end if

 

For the second error, there are a number of candidates that could be causing 
this problem. I'd go with this one. Change this

 

#if $show_pop

        <td class='col-pop'>

  #if $period.pop.raw > 0

          $period.pop.format('%.0f',' ')

  #end if

<br/>

  #if $period.qpf.raw > 0

          $period.qpf.nolabel('%.2f',' ') <img class='pop-img' 
src='icons/raindrop.png' />

  #end if

<br/>

  #if $period.qsf.raw > 0

          $period.qsf.nolabel('%.2f',' ') <img class='pop-img' 
src='icons/snowflake.png' />

  #end if

        </td>

#end if

 

to this

 

#if $show_pop

        <td class='col-pop'>

  #if $period.pop.raw is not None and $period.pop.raw > 0

          $period.pop.format('%.0f',' ')

  #end if

<br/>

  #if $period.qpf.raw is not None and $period.qpf.raw > 0

          $period.qpf.nolabel('%.2f',' ') <img class='pop-img' 
src='icons/raindrop.png' />

  #end if

<br/>

  #if $period.qsf.raw is not None and $period.qsf.raw > 0

          $period.qsf.nolabel('%.2f',' ') <img class='pop-img' 
src='icons/snowflake.png' />

  #end if

        </td>

#end if

 

But I could be wrong on that.

 

-tk

 

 

On Thu, Jun 4, 2020 at 6:14 AM Mike Thompson <mike.thomp...@noworries.plus.com 
<mailto:mike.thomp...@noworries.plus.com> > 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
      &#8679;
#elif $x < 0
      &#8681;
#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 weewx-user+unsubscr...@googlegroups.com 
<mailto:weewx-user+unsubscr...@googlegroups.com> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/19346a94-d78e-4732-9d6d-36fb7a22ab2e%40googlegroups.com
 
<https://groups.google.com/d/msgid/weewx-user/19346a94-d78e-4732-9d6d-36fb7a22ab2e%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 weewx-user+unsubscr...@googlegroups.com 
<mailto:weewx-user+unsubscr...@googlegroups.com> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEArY3s7nDTX0QnLT8hNzeRsFh%3Dt3QZ-8UYiqXa1dzEFRA%40mail.gmail.com
 
<https://groups.google.com/d/msgid/weewx-user/CAPq0zEArY3s7nDTX0QnLT8hNzeRsFh%3Dt3QZ-8UYiqXa1dzEFRA%40mail.gmail.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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/00bc01d657d1%24d9112850%248b3378f0%24%40kb2ear.net.

Reply via email to