I'm not the maintainer of this extension, and I don't use it so I'm purely 
guessing here.  

But based on the information you've given, try replacing the section you've 
pasted with this. Maintain a backup copy in case you need to revert back. 

try:
            history = int(plot_options.get('history'))
        except:
            pass
        else:
            history_list = []
            windspeed_history_list = []


            batch_records = self.db_manager.genBatchRecords(self.lastGoodStamp 
- history * 60 * 60, self.lastGoodStamp)


            for rec in batch_records:
                db_value_tuple = weewx.units.as_value_tuple(rec, columnname)
                history_value = weewx.units.convert(db_value_tuple, 
target_unit)[0]


                try:
                    if history_value is not None:
                        history_list.append(float(history_value))
                    else:
                        continue
                except:
                    syslog.syslog(syslog.LOG_DEBUG, "GaugeGenerator: Cannot 
decode reading of '%s' for gauge '%s'"
                                  % (history_value, gaugename))



On Wednesday, June 24, 2020 at 12:15:36 PM UTC-4, Andrej B. wrote:
>
> Good afternoon,
>
> I use Bootstrap theme with Nick gauges (dajda.net). Weewx ver. 4.1 under 
> python 2.7 (Debian Buster)
> In my syslog every archive interval I see hundreds messages like: 
> GaugeGenerator: Cannot decode reading of 'None' for gauge 'windDir'
> This is only happens when wind speed is not None. Below is logfile part:
>
>
>
>
>
>
>
>
>
>
>
> *Jun 24 19:00:15 weewxpi weewxd: GaugeGenerator: outTemp reading = 25.5 
> degree_CJun 24 19:00:15 weewxpi weewxd: GaugeGenerator: inTemp reading = 
> 24.1111111111 degree_CJun 24 19:00:15 weewxpi weewxd: GaugeGenerator: 
> barometer reading = 1022.58763232 mbarJun 24 19:00:15 weewxpi weewxd: 
> GaugeGenerator: outHumidity reading = 49.0 percentJun 24 19:00:15 weewxpi 
> weewxd: GaugeGenerator: inHumidity reading = 56.0 percentJun 24 19:00:16 
> weewxpi weewxd: GaugeGenerator: windSpeed reading = 2.68224 
> meter_per_secondJun 24 19:00:16 weewxpi weewxd: GaugeGenerator: windGust 
> reading = 6.25856 meter_per_secondJun 24 19:00:16 weewxpi weewxd: 
> GaugeGenerator: windDir reading = 0.0 degree_compassJun 24 19:00:16 weewxpi 
> weewxd: GaugeGenerator: Cannot decode reading of 'None' for gauge 
> 'windDir'Jun 24 19:00:16 weewxpi weewxd: GaugeGenerator: Cannot decode 
> reading of 'None' for gauge 'windDir'Jun 24 19:00:16 weewxpi weewxd: 
> GaugeGenerator: Cannot decode reading of 'None' for gauge 'windDir'*
>
> This is part of code responsible for this:
>
> try:
>             history = int(plot_options.get('history'))
>         except:
>             pass
>         else:
>             history_list = []
>             windspeed_history_list = []
>
>             batch_records = 
> self.db_manager.genBatchRecords(self.lastGoodStamp - history * 60 * 60, 
> self.lastGoodStamp)
>
>             for rec in batch_records:
>                 db_value_tuple = weewx.units.as_value_tuple(rec, 
> columnname)
>                 history_value = weewx.units.convert(db_value_tuple, 
> target_unit)[0]
>
>                 try:
>                     history_list.append(float(history_value))
>                 except:
>                     syslog.syslog(syslog.LOG_DEBUG, "GaugeGenerator: 
> Cannot decode reading of '%s' for gauge '%s'"
>                                   % (history_value, gaugename))
>
>
> Why this happens when wind speed has reading?
>
> Thanks
>

-- 
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/5328740c-4e91-4b66-bc9c-b1423327971fo%40googlegroups.com.

Reply via email to