The ".raw" suffix means you will get the actual value, which could be a
float, or it can be Python 'None'. If you are going to do a comparison, you
must check to see if the value might be None.

Your template code should look something like this:

   #if $trend.extraTemp9.raw is None
      <td>Unknown</td>
      <td>N/A</td>
   #elif $trend.extraTemp9.raw < 0
      <td class="hes1_trendlo"> &#8681;</td>

      ...

   #end if

Same with your air sensor code.

-tk

On Sun, Apr 7, 2019 at 11:48 PM Hartmut Schweidler <[email protected]>
wrote:

> Nachtrag mit syslog
> ich habe gestern einen Sensor gesäubert und ihn anschließend wieder in
> Betrieb genommen. Nach dem Neustart von weewx um 11:00 Uhr gab es sie
> folgenden Fehlenmeldungen
>
> yesterday I cleaned a sensor and then put it back into operation. After
> restart weewx at 11:00 am they had the following missing messages
>
> Apr  7 11:05:31 wetter OWFS[29697]: cheetahgenerator: **** Ignoring
> template /home/weewx/skins/Standard/indexOWFS.html.tmpl
> Apr  7 11:05:31 wetter OWFS[29697]: cheetahgenerator: **** Reason: '<' not
> supported between instances of 'NoneType' and 'int'
> Apr  7 11:05:31 wetter OWFS[29697]: ****  Traceback (most recent call
> last):
> Apr  7 11:05:31 wetter OWFS[29697]: ****    File
> "/home/weewx/bin/weewx/cheetahgenerator.py", line 331, in generate
> Apr  7 11:05:31 wetter OWFS[29697]: ****      unicode_string =
> compiled_template.respond()
> Apr  7 11:05:31 wetter OWFS[29697]: ****    File
> "_home_weewx_skins_Standard_indexOWFS_html_tmpl.py", line 743, in respond
> Apr  7 11:05:31 wetter OWFS[29697]: ****  TypeError: '<' not supported
> between instances of 'NoneType' and 'int'
>
> Error by 11:05.24 last Error by 13:55:32
>
> Apr  7 11:00:38 wetter weewx-weewx[29693]: engine: Initializing weewx
> version 4.0.0a4
> Apr  7 11:00:38 wetter weewx-weewx[29693]: engine: Using Python 3.7.3rc1
> (default, Mar 13 2019, 11:01:15) #012[GCC 8.3.0]
> Apr  7 11:00:38 wetter weewx-weewx[29693]: engine: Platform
> Linux-4.9.0-8-amd64-x86_64-with-debian-9.8
> Apr  7 11:00:38 wetter weewx-weewx[29693]: engine: Locale is 'de_DE.UTF-8'
> Apr  7 11:00:38 wetter weewx-weewx[29693]: engine: pid file is
> /var/run/weewx-weewx.pid
> Apr  7 11:00:38 wetter weewx-weewx[29697]: engine: Using configuration
> file /home/weewx/weewx.conf
> Apr  7 11:00:38 wetter weewx-weewx[29697]: engine: Loading station type
> Vantage (weewx.drivers.vantage)
> Apr  7 11:00:38 wetter weewx-weewx[29697]: owfs: service version is 0.21
> Apr  7 11:00:38 wetter weewx-weewx[29697]: owfs: binding is archive
> Apr  7 11:00:38 wetter weewx-weewx[29697]: owfs: interface is u
> Apr  7 11:00:38 wetter weewx-weewx[29697]: owfs: sensor map is
> {'extraTemp1': '/uncached/28.829410050000/temperature', 'extraTemp4':
> '/uncached/28.5E1E31050000/temperatur
> e', 'extraTemp3': '/uncached/28.FF131B440400/temperature', 'extraTemp6':
> '/uncached/28.FF701B410400/temperature', 'extraTemp5':
> '/uncached/28.FFAC23430400/temperature', '
> extraTemp2': '/uncached/28.FF2E20440400/temperature', 'extraTemp7':
> '/uncached/28.FEAE5E050000/temperature', 'soilTempO1':
> '/uncached/28.FFA71E430400/temperature', 'soilT
> empO2': '/uncached/28.FE4D11050000/temperature', 'soilTempO3':
> '/uncached/28.8DE010050000/temperature', 'soilTempO4':
> '/uncached/28.FF0C1F430400/temperature', 'soilTempO5
> ': '/uncached/28.FFB31B410400/temperature', 'supplyVoltage':
> '/26.45CD92010000', 'heatingVoltage': '/26.0EFF91010000',
> 'referenceVoltage': '/26.F8FE91010000', 'extraHumid
> 1': '/26.45CD92010000',  'extraHumid2': '/26.45CD92010000/humidity',
> 'outTempBatteryStatus': '/26.45CD92010000/VAD', 'rainBatt
> eryStatus': '/26.45CD92010000/VDD', 'lighting': '/26.F8FE91010000',
> 'extraTemp9': '/26.45CD92010000/temperature', 'extraTemp8':
> '/26.0EFF91010000/temperature'}
> Apr  7 11:00:38 wetter weewx-weewx[29697]: owfs: sensor type map is
> {'extraHumid1': 'humhes', 'lighting': 'lighes', 'supplyVoltage': 'owvolt',
> 'heatingVoltage': 'owvolt',
>  'referenceVoltage': 'owvolt'}
> Apr  7 11:00:38 wetter weewx-weewx[29697]: owfs: sensor unit system is
> metric
> Apr  7 11:00:38 wetter OWFS[29697]: DEFAULT: ow_usb_msg.c:(214) Opened USB
> DS9490 bus master at 3:2.
> Apr  7 11:00:38 wetter OWFS[29697]: DEFAULT: ow_usb_cycle.c:(128) Set
> DS9490 3:2 unique id to 81 F3 BB 33 00 00 00 7E
> Apr  7 11:00:38 wetter OWFS[29697]: snowdepth: using /home/weewx/snow
>
>
> Apr  7 13:55:25 wetter OWFS[29697]: restx: WindFinder: Published record
> 2019-04-07 13:55:00 CEST (1554638100)
> Apr  7 13:55:32 wetter OWFS[29697]: cheetahgenerator: Generate failed with
> exception '<class 'TypeError'>'
> Apr  7 13:55:32 wetter OWFS[29697]: cheetahgenerator: **** Ignoring
> template /home/weewx/skins/Standard/indexOWFS.html.tmpl
> Apr  7 13:55:32 wetter OWFS[29697]: cheetahgenerator: **** Reason: '<' not
> supported between instances of 'NoneType' and 'int'
> Apr  7 13:55:32 wetter OWFS[29697]: ****  Traceback (most recent call
> last):
> Apr  7 13:55:32 wetter OWFS[29697]: ****    File
> "/home/weewx/bin/weewx/cheetahgenerator.py", line 331, in generate
> Apr  7 13:55:32 wetter OWFS[29697]: ****      unicode_string =
> compiled_template.respond()
> Apr  7 13:55:32 wetter OWFS[29697]: ****    File
> "_home_weewx_skins_Standard_indexOWFS_html_tmpl.py", line 743, in respond
> Apr  7 13:55:32 wetter OWFS[29697]: ****  TypeError: '<' not supported
> between instances of 'NoneType' and 'int'
>
> danach gab es keine Fehler mehr  Die Vermutung liegt nahe "trend" ist der
> Auslöser
>
> After that, there were no more mistakes The assumption is close to
> "trend" is the trigger
>
> Hartmut
>

Reply via email to