Thanks for the insight Gary. I haven't run into this problem yet - even on brand new VM's with only 5 minutes worth of Simulator data.
On Friday, August 24, 2018 at 5:27:05 AM UTC-4, gjr80 wrote: > > Yes I have seen similar errors on numerous occasions, but I have never > seen a cause like this one before. I believe the cause is that the SLEs are > being run against the [[SummaryByMonth]] and [[SummaryByYear]] reports. > > The timespan parameter that is used in the SLE signatures is a TimeSpan > object covering the period of the report. For [[ToDate]] reports this is > typically the period covered by the current archive record, for example the > last 5 minutes. However, the [[SummaryByMonth]] and [[SummaryByYear]] > reports are generated by iterating over all the months and years of data in > the archive, so the period covered varies as the cheetahgenerator iterates > over the months and/or years. For example, the January 2014 NOAA report > will use a timespan of midnight 1 January 2014 until midnight 1 February > 2014. > > The way the SLEs work is that all listed SLEs are evaluated for each > report in a skin, irrespective of whether they are [[SummaryByMonth]], > [[SummaryByYear]] or [[ToDate]] reports. So when the January 2014 NOAA > report is generated the highchartsDay SLE is evaluated using a timespan of > midnight 1 January 2014 until midnight 1 February 2014. Midnight today (24 > August 2018) is used as the start time and midnight 1 February 2014 is used > as the stop time. Consequently the error hits. > > So why does this affect some people some of the time? The answer is in how > the [[SummaryByMonth]] and [[SummaryByYear]] reports are generated. > Normally only the current year and current month reports are generated, > these will not produce the error. However, if a user deletes all of the > generated [[SummaryByMonth]] and [[SummaryByYear]] reports then all of the > reports are regenerated and the error will bite when a historical report is > generated. Same for any one with a clean install with data from more than 1 > month in their archive. > > Solutions, well a couple come to mind: > > 1. Create a second skin to generate the [[SummaryByMonth]] and > [[SummaryByYear]] reports so you can limit the SLE used. > 2. It seems your [[SummaryByMonth]] and [[SummaryByYear]] reports are just > the NOAA format reports, perhaps the Standard skin versions could be used, > but this may be more complex. > 3. Still thinking of number 3. > > Gary > > -- 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. For more options, visit https://groups.google.com/d/optout.