Tom,

This workaround in wxservices.py works for me.

    def _setup(self, stop_ts, db_manager):
        """Initialize the rain event list"""
        if self.rain_events is None:
            self.rain_events = []
        start_ts = stop_ts - self.retain_period
        try:
            # Get all rain events since the window start from the database
            for row in db_manager.genSql("SELECT dateTime, usUnits, rain 
FROM %s "
                                         "WHERE dateTime>? AND dateTime<=?;"
                                         % db_manager.table_name, 
(start_ts, stop_ts)):
                # Unpack the row:
                time_ts, unit_system, rain = row
                self.add_loop_packet({'dateTime': time_ts, 'usUnits': 
unit_system, 'rain': rain},
                                     db_manager)
        except weedb.DatabaseError as e:
            log.debug("DatabaseError '%s'" % e)

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-development+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/d6d6f37f-911c-40f4-9043-33c6d563db27%40googlegroups.com.

Reply via email to