Hi,

Try using:

$day($data_binding='purpleair_binding').pm2_5_atm.maxtime.format($Time) $day
($data_binding='purpleair_binding').pm2_5_atm.max.nolabel($Count,$NONE)

Gary


On Tuesday, 30 June 2020 22:32:23 UTC+10, Rahul Bedi wrote:
>
> Hi,
>
> I have been trying to update the NOAA template to incorporate the air 
> quality data in the monthly report, but when I added the two entries (in 
> red)  in the file  NOAA-YYYY-MM.txt.tmpl, I an error (attached at the end).
> Interestingly the same two entries, in the hilo.inc file in the Seasons 
> skin work fine.
>
> Even more interestingly, the same two entries placed just before the 
> "MONTHLY ..." line, work just fine.
>
> Any idea about what am I doing wrong ?
>
> Thanks.
>
> - Rahul
>
>
> #errorCatcher Echo
> #set $YM="%Y %m"
> #set $D=" %d"
> #set $M=" %b"
> #set $Time=" %H:%M"
> #set $NODAY=" N/A"
> #set $Temp="%6.1f"
> #set $Wind="%6.1f"
> #set $Dir="%6.0f"
> #set $Count="%6d"
> #set $NONE="   N/A"
> #if $unit.unit_type_dict.group_rain == "mm"
> #set $Rain="%6.1f"
> #else
> #set $Rain="%6.2f"
> #end if
>
>
>                    MONTHLY CLIMATOLOGICAL SUMMARY for $month_name 
> $year_name
>
>
> NAME: $station.location
> ELEV: $station.altitude    LAT: $station.latitude[0]-$station.latitude[1] 
> $station.latitude[2]    LONG: $station.longitude[0]-$station.longitude[1] 
> $station.longitude[2]
>
>
>                    TEMPERATURE ($unit.label.outTemp.strip()), RAIN 
> ($unit.label.rain.strip()), WIND SPEED ($unit.label.windSpeed.strip())
>
>                                          HEAT   COOL         AVG
>       MEAN                               DEG    DEG          WIND          
>          DOM
> DAY   TEMP   HIGH   TIME    LOW   TIME   DAYS   DAYS   RAIN  SPEED   HIGH  
>  TIME    DIR
>
> ---------------------------------------------------------------------------------------
> #for $day in $month.days
> #if $day.barometer.count.raw
> $day.dateTime.format($D) $day.outTemp.avg.nolabel($Temp,$NONE) 
> $day.outTemp.max.nolabel($Temp,$NONE) $day.outTemp.maxtime.format($Time) 
> $day.outTemp.min.nolabel($Temp,$NONE) $day.outTemp.mintime.format($Time) 
> $day.heatdeg.sum.nolabel($Temp,$NONE) $day.cooldeg.sum.nolabel($Temp,$NONE) 
> $day.rain.sum.nolabel($Rain,$NONE) $day.wind.avg.nolabel($Wind,$NONE) 
> $day.wind.max.nolabel($Wind,$NONE) $day.wind.maxtime.format($Time) 
> $day.wind.vecdir.nolabel($Dir,$NONE) 
> $day('purpleair_binding').pm2_5_atm.maxtime.format($Time) 
> $day('purpleair_binding').pm2_5_atm.max.nolabel($Count,$NONE)
> #else
> $day.dateTime.format($D)
> #end if
> #end for
>
> ---------------------------------------------------------------------------------------
>     $month.outTemp.avg.nolabel($Temp,$NONE) 
> $month.outTemp.max.nolabel($Temp,$NONE)    
> $month.outTemp.maxtime.format($D) $month.outTemp.min.nolabel($Temp,$NONE)  
>   $month.outTemp.mintime.format($D) $month.heatdeg.sum.nolabel($Temp,$NONE) 
> $month.cooldeg.sum.nolabel($Temp,$NONE) 
> $month.rain.sum.nolabel($Rain,$NONE) $month.wind.avg.nolabel($Wind,$NONE) 
> $month.wind.max.nolabel($Wind,$NONE)    $month.wind.maxtime.format($D) 
> $month.wind.vecdir.nolabel($Dir)
>
>
>
> Error log:
>
> Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
> weewx.cheetahgenerator: Generate failed with exception '<type 
> 'exceptions.TypeError'>'
> Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
> weewx.cheetahgenerator: **** Ignoring template 
> /etc/weewx/skins/Seasons/NOAA/NOAA-YYYY-MM.txt.tmpl
> Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
> weewx.cheetahgenerator: **** Reason: 'TimespanBinder' object is not callable
> Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
> weewx.cheetahgenerator: ****  Traceback (most recent call last):
> Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
> weewx.cheetahgenerator: ****    File 
> "/usr/share/weewx/weewx/cheetahgenerator.py", line 322, in generate
> Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
> weewx.cheetahgenerator: ****      unicode_string = 
> compiled_template.respond()
> Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
> weewx.cheetahgenerator: ****    File 
> "cheetah__etc_weewx_skins_Seasons_NOAA_NOAA_YYYY_MM_txt_tmpl_1593519917_36_48096.py",
>  
> line 525, in respond
> Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
> weewx.cheetahgenerator: ****    File 
> "cheetah__etc_weewx_skins_Seasons_NOAA_NOAA_YYYY_MM_txt_tmpl_1593519917_36_48096.py",
>  
> line 336, in __errorCatcher39
> Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
> weewx.cheetahgenerator: ****    File "<string>", line 1, in <module>
> Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
> weewx.cheetahgenerator: ****  TypeError: 'TimespanBinder' object is not 
> callable
> Jun 30 17:55:26 PrideWeatherStation weewx[23078] INFO weewx.reportengine: 
> Copied 0 files to /var/www/html/weewx
> Jun 30 17:55:27 PrideWeatherStation weewx[23078] INFO 
> weewx.cheetahgenerator: Generated 1 files for report wxobs in 0.57 seconds
> Jun 30 17:55:27 PrideWeatherStation weewx[23078] INFO weewx.reportengine: 
> Copied 0 files to /var/www/html/weewx/wxobs
> Jun 30 17:55:27 PrideWeatherStation weewx[23078] INFO 
> user.stackedwindrose: Generated 2 images for StackedWindRose in 0.41 seconds
>
>
>
>

-- 
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/95c7ee24-4b93-4d4b-907c-42df04562fa4o%40googlegroups.com.

Reply via email to