Must have been a missed check in .

in standards.py, replace interpret_aqi_index() with

    def interpret_aqi_index(self, aqi_index):
        '''Returns the color and category name associated with the pollutant
        with the aqi_index (not aqi value).'''
        return {
            'color': self.colors[aqi_index],
            'category': self.categories[aqi_index]

Or just download the new version (v1.1.2)



On Sunday, June 9, 2019 at 11:11:50 AM UTC-7, Hartmut Schweidler wrote:
>
> Hallo Jonathan,
>
> the test for the weekend
> Der Wocheendtest, aber nur Fehler   bei aqi....Color und aqi....category
>
> in my "indexAir.htmk.tmpl" the code
>
> <div style="text-align: center; background-color: 
> #$aqi($current($data_binding='aqi_binding').aqi_pm2_5_category).color;" >
>     $current($data_binding='aqi_binding').aqi_pm2_5 <br/>  ---> "Result is 
> right 3,0 µg/m³" <http://wetter/weewx/dayPM25.png>
>     $aqi($current($data_binding='aqi_binding').aqi_pm2_5_category).category
> </div>
>
> <div style="text-align: center; background-color: 
> #$aqi($current($data_binding='aqi_binding').aqi_pm10_0_category).color;" >
>     $current($data_binding='aqi_binding').aqi_pm10_0 <br/>   ----> "Result is 
> right 21,0 µg/m³" <http://wetter/weewx/dayPM25.png>
>     $aqi($current($data_binding='aqi_binding').aqi_pm10_0_category).category
> </div>
>
> it does not work right
>
> The Errors
>
> Jun  9 19:50:29 wetter weewx-cmon[7576]: copygenerator: copied 0 files to 
> /home/weewx/public_html
> Jun  9 19:50:33 wetter OWFS[14428]: cheetahgenerator: Generate failed with 
> exception '<class 'NameMapper.NotFound'>'
> Jun  9 19:50:33 wetter OWFS[14428]: cheetahgenerator: **** Ignoring template 
> /home/weewx/skins/Standard/indexAir.html.tmpl
> Jun  9 19:50:33 wetter OWFS[14428]: cheetahgenerator: **** Reason: cannot 
> find 'color' while searching for 'color'
> Jun  9 19:50:33 wetter OWFS[14428]: ****  Traceback (most recent call last):
> Jun  9 19:50:33 wetter OWFS[14428]: ****    File 
> "/home/weewx/bin/weewx/cheetahgenerator.py", line 331, in generate
> Jun  9 19:50:33 wetter OWFS[14428]: ****      unicode_string = 
> compiled_template.respond()
> Jun  9 19:50:33 wetter OWFS[14428]: ****    File 
> "cheetah__home_weewx_skins_Standard_indexAir_html_tmpl_1560102633_0441406_65394.py",
>  line 1105, in respond
> Jun  9 19:50:33 wetter OWFS[14428]: ****  NameMapper.NotFound: cannot find 
> 'color' while searching for 'color'
> Jun  9 19:50:33 wetter OWFS[14428]: cheetahgenerator: Generated 9 files for 
> report StandardReport in 7.64 seconds
>
> or / and
>
> Jun  9 19:55:33 wetter OWFS[14428]: cheetahgenerator: Generate failed with 
> exception '<class 'NameMapper.NotFound'>'
> Jun  9 19:55:33 wetter OWFS[14428]: cheetahgenerator: **** Ignoring template 
> /home/weewx/skins/Standard/indexAir.html.tmpl
> Jun  9 19:55:33 wetter OWFS[14428]: cheetahgenerator: **** Reason: cannot 
> find 'category' while searching for 'category'
> Jun  9 19:55:33 wetter OWFS[14428]: ****  Traceback (most recent call last):
> Jun  9 19:55:33 wetter OWFS[14428]: ****    File 
> "/home/weewx/bin/weewx/cheetahgenerator.py", line 331, in generate
> Jun  9 19:55:33 wetter OWFS[14428]: ****      unicode_string = 
> compiled_template.respond()
> Jun  9 19:55:33 wetter OWFS[14428]: ****    File 
> "cheetah__home_weewx_skins_Standard_indexAir_html_tmpl_1560102933_0067816_68569.py",
>  line 1106, in respond
> Jun  9 19:55:33 wetter OWFS[14428]: ****  NameMapper.NotFound: cannot find 
> 'category' while searching for 'category'
> Jun  9 19:55:33 wetter OWFS[14428]: cheetahgenerator: Generated 9 files for 
> report StandardReport in 7.19 seconds
>
> i have in default weewx.conf :
>
> [AqiService]
>     [[air_sensor]]
>         pm2_5 = pm_25
>         temp = tempAir
>         data_binding = air_binding
>         dateTime = dateTime
>         pressure = presAir
>         pm10_0 = pm_10
>         usUnits = usUnits
>     [[standard]]
>         data_binding = aqi_binding
>         standard = user.aqi.us.NowCast
>
>
> and  in skins 
>
> [CheetahGenerator]
>     search_list_extensions = user.aqi.service.AqiSearchList
>
>
> Result no color no category
>  
>
>> Thank you
>> Hartmut
>>
>>

-- 
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/d4bb20f9-b81d-44a1-abd0-b4038e8cb6b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to