No need to make such drastic changes. True it is a python 2/python3 issue but the fix is far simpler. The clue is in the error message:
Jan 24 21:20:16 debian-weewx weewx-WMR200[13641] ERROR weewx.cheetahgenerator: **** Reason: '>' not supported between instances of 'str' and 'int' An expression involving > in the template is using a string and an integer as operands and python3 doesn’t like the string (whereas python2 will accept a numeric string). Looking through the template there are five instances where > is used in an expression. Three of these use xxxx.raw on the left hand side of the > so they are not using a string. The remaining two are using xxxx.formatted on the left hand side of the > and xxxx.formatted does return a string. So that suggests the following lines are the source of the error: #if $trend.windSpeed.formatted > 0 ⇧ #elif $trend.windSpeed.formatted < 0 ⇩ I can see no reason to use .formatted over .raw in this case so try changing the above lines in /etc/weewx/skins/simple/index.html.tmpl to: #if $trend.windSpeed.raw > 0 ⇧ #elif $trend.windSpeed.raw < 0 ⇩ Save the template and see how that goes on the next report cycle, no need to restart WeeWX. Gary On Monday, 25 January 2021 at 07:46:05 UTC+10 [email protected] wrote: > I think, if you also install python2 (they can be both on the same > machine) > and change in /etc/default/weewx > the WEEWX_PYTHON entry into > > WEEWX_PYTHON=python2 > > and then restart weewx, it should work. > > Once the skin has been updated and tested for Python3, you can change it > back to python3 again. > On 24.01.2021 22:29, Rainer Lang wrote: > > So it appears - just tested and saw that under Python 2.7.16 the skin runs > without problems. Weewx is 4.3.0 > > On 24.01.2021 22:08, John Kline wrote: > > It seems weewx-simple does not (yet) support Python 3. > > On Jan 24, 2021, at 12:46 PM, [email protected] <[email protected]> > wrote: > > Hello > > I used the simple template from > https://github.com/matthewwall/weewx-simple > > My platform > Debian10 / Python 3 /last Weewx (4.3.0) > > When I activate simple template I ve this error : > > Jan 24 21:20:16 debian-weewx weewx-WMR200[13641] ERROR > weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>' > Jan 24 21:20:16 debian-weewx weewx-WMR200[13641] ERROR > weewx.cheetahgenerator: **** Ignoring template > /etc/weewx/skins/simple/index.html.tmpl > Jan 24 21:20:16 debian-weewx weewx-WMR200[13641] ERROR > weewx.cheetahgenerator: **** Reason: '>' not supported between instances of > 'str' and 'int' > Jan 24 21:20:16 debian-weewx weewx-WMR200[13641] ERROR > weewx.cheetahgenerator: **** Traceback (most recent call last): > Jan 24 21:20:16 debian-weewx weewx-WMR200[13641] ERROR > weewx.cheetahgenerator: **** File > "/usr/share/weewx/weewx/cheetahgenerator.py", line 323, in generate > Jan 24 21:20:16 debian-weewx weewx-WMR200[13641] ERROR > weewx.cheetahgenerator: **** unicode_string = > compiled_template.respond() > Jan 24 21:20:16 debian-weewx weewx-WMR200[13641] ERROR > weewx.cheetahgenerator: **** File > "cheetah__etc_weewx_skins_simple_index_html_tmpl_1611519616_295277_76818.py", > line 1554, in respond > Jan 24 21:20:16 debian-weewx weewx-WMR200[13641] ERROR > weewx.cheetahgenerator: **** TypeError: '>' not supported between > instances of 'str' and 'int' > Jan 24 21:20:16 debian-weewx weewx-WMR200[13641] INFO > weewx.cheetahgenerator: Generated 0 files for report simple in 0.08 seconds > > Can someone help me ? > > Thanks > Stéphane > -- > 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/c48a3315-cee6-41ae-9218-c7c6a6926b67n%40googlegroups.com > > <https://groups.google.com/d/msgid/weewx-user/c48a3315-cee6-41ae-9218-c7c6a6926b67n%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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/A2A61D1E-0E00-4470-A971-9676C9C0084A%40johnkline.com > > <https://groups.google.com/d/msgid/weewx-user/A2A61D1E-0E00-4470-A971-9676C9C0084A%40johnkline.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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c83bc121-fce7-49ca-832f-eadb1bc401d7n%40googlegroups.com.
