Your graphs.conf looks correct, but the error is not related to 
day_ago_to_now, it looks like day_ago_to_now is being skipped for some 
reason. 

Take a backup of graphs.conf, then try this as your only item in 
graphs.conf? 

[timetestchart]
    title = Time Test Chart
    show_button = true
    button_text = Time Test Chart
    gapsize = 300

    [[chart1]]
        title = Temperature
        time_length = day_ago_to_now
        time_ago = 1
        start_at_midnight = true
        #aggregate_type = max
        #aggregate_interval = 86400 # 1 day
        gapsize = 86400
        [[[outTemp]]]
            zIndex = 1
            name = Temperature
        [[[windchill]]]
        [[[heatindex]]]
        [[[dewpoint]]]



On Sunday, August 2, 2020 at 6:35:10 AM UTC-4 [email protected] wrote:

> Hi,
>
> i try to create a chart with time-lenght=day_ago_to_now or hour_ago_to_now 
> according to the documentation.
> I do not succeed.
>
> WeeWX version: 4.1.1  Belchertown Skin Version: 1.2rc1 
>
> /var/log/weewx.log
>
> weewx.cheetahgenerator: Generated 11 files for report Belchertown in 0.82 
> seconds
> weewx.reportengine: Copied 3 files to /var/www/html/public_html
> weewx.reportengine: Caught unrecoverable exception in generator 
> 'user.belchertown.HighchartsJsonGenerator'
> weewx.reportengine:         ****  invalid literal for int() with base 10: 
> 'day_ago_to_now'
> weewx.reportengine:         ****  Traceback (most recent call last):
> weewx.reportengine:         ****    File 
> "/usr/share/weewx/weewx/reportengine.py", line 197, in run
> weewx.reportengine:         ****      obj.start()
> weewx.reportengine:         ****    File 
> "/usr/share/weewx/weewx/reportengine.py", line 280, in start
> weewx.reportengine:         ****      self.run()
> weewx.reportengine:         ****    File 
> "/usr/share/weewx/user/belchertown.py", line 1507, in run
> weewx.reportengine:         ****      time_length = int(time_length) # 
> Convert to int() for minstamp math and for point_timestamp conditional later
> weewx.reportengine:         ****  ValueError: invalid literal for int() 
> with base 10: 'day_ago_to_now'
> weewx.reportengine:         ****  Generator terminated
>
> --------------------------
> graphs.conf
>
> aggregate_type = None
> time_length = 90000 # Last 25 hours
> type = line
> tooltip_date_format = "LLL"
>
> [homepage]
>     # Chart Timespan Defaults
>     title = "Homepage"
>     show_button = true
>     button_text = "Homepage"
> #    time_length = today
>     tooltip_date_format = "LLL"
>     gapsize = 300000
>
>     [[chart1]]
>         title = Temperature
>         time_length = day_ago_to_now
>         time_ago = 1
>         start_at_midnight = true      
>         [[[outTemp]]]
>             zIndex = 1
>             name = Temperature
>
>
> Joachim
>
>

-- 
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/a5213087-1f46-4be1-908d-10b3ffcc5110n%40googlegroups.com.

Reply via email to