Belchertown - suppressing graph=homepage >

146 views
Skip to first unread message

David Levine

unread,
Jan 5, 2021, 8:34:53 PM1/5/21
to weewx-user
When I look at https://belchertownweather.com/graphs/ there is no ?graph=homepage present.  When I comment out, rename or remove the [homepage] section in graphs.conf, an error is generated to syslog and there's nothing displayed on my site at /graphs/ . 

I can add other sections such as [yesterday] but I've not found the magic to remove.rename homepage. 

What am I missing? Running the new 4.3 version of weewx and latest Belchertown skin.

Jan  5 22:55:41 raspberrypi weewx[17253] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'KeyError'>'

Jan  5 22:55:41 raspberrypi weewx[17253] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Belchertown/index.html.tmpl

Jan  5 22:55:41 raspberrypi weewx[17253] ERROR weewx.cheetahgenerator: **** Reason: 'homepage'

Jan  5 22:55:41 raspberrypi weewx[17253] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):

Jan  5 22:55:41 raspberrypi weewx[17253] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 323, in generate

Jan  5 22:55:41 raspberrypi weewx[17253] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()

Jan  5 22:55:41 raspberrypi weewx[17253] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_Belchertown_index_html_tmpl.py", line 1508, in respond

Jan  5 22:55:41 raspberrypi weewx[17253] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_Belchertown_index_html_tmpl.py", line 631, in __errorCatcher81

Jan  5 22:55:41 raspberrypi weewx[17253] ERROR weewx.cheetahgenerator: ****    File "<string>", line 1, in <module>

Jan  5 22:55:41 raspberrypi weewx[17253] ERROR weewx.cheetahgenerator: ****  KeyError: 'homepage'


David

Timothy L

unread,
Jan 5, 2021, 10:07:26 PM1/5/21
to weewx...@googlegroups.com

Is this thread what you are asking?
https://groups.google.com/g/weewx-user/c/qUt0XdqREqk/m/gGh5Of8cAgAJ

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b08a5bed-c75b-4148-a586-9e8ed16f0c05n%40googlegroups.com.

David

unread,
Jan 5, 2021, 10:25:51 PM1/5/21
to weewx...@googlegroups.com
Thanks but that does not seem to be the situation I’m encountering.  

I can’t seem to remove/rename [homepage] in graphs.conf



You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/Zmli8blPTIM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c4dgvo32pceu9rro6rkqv5s9.1609902439052%40email.android.com.

Colin Larsen

unread,
Jan 5, 2021, 11:12:54 PM1/5/21
to weewx-user
Why do you wish to remove it, what are you trying to achieve? I'm a little confused sorry

Colin

David Levine

unread,
Jan 6, 2021, 8:41:12 AM1/6/21
to weewx-user
Using https://belchertownweather.com/graphs/ as a reference, none of the links are to graph=homepage, There are links to graph=all, graph=day, graph=week, ... No graph=homepage.  If I remove the [homepage] section in graphs.conf,  an error is generated to syslog and when I go to .../graphs/ I get no graphs displayed on that landing page. 

Not to complicate things further but if leave [homepage] and change the button to say Today, I get an acceptable approach, but then I'd like to remove the [day] section as it seems to be a duplicate. If I remove [day] I also seem to get no graphs generated on the .../graphs/ page. 

If it helps, this is where the generated pages are getting FTP'ed to from my local Raspberry pi - http://www.levinecentral.com/weather/graphs/ 

If I comment out [day] in graphs.conf, http://www.levinecentral.com/weather/graphs/ won't show any graphs between the buttons and footer. 

David

David Levine

unread,
Jan 7, 2021, 5:40:51 PM1/7/21
to weewx-user
I wanted to close this out as I identified the cause of my trials and tribulations but you have to read a bit to get to it. As a recap, I wanted to remove Homepage and have Day, Yesterday, Week and Month graphs displayed like at https://belchertownweather.com/graphs/

The default w/o graphs.conf or with graphs.conf.example copied to graphs.conf results in Homepage, Day, Week, Month & Year.  Homepage and Day are the same graphs with the default config. As I read in https://github.com/poblabs/weewx-belchertown/wiki/Belchertown-Charts-Documentation , [day], [week], [month] & [year] must be present. Ok, that's fine so I should be able to delete [homepage] and add [yesterday] - piece of cake. Well that didn't work with an error being thrown to syslog and no graph on the front page. 

Next I read in the same charts documentation page to use the following in the weewx.conf file to override which graph set is displayed on the home page: highcharts_frontpage_graphgroup = week.  Well, that just didn't work for me. After many dozens of weewx.conf adjustments w/ stop & start and with many, many, many Belchertown/graphs.conf adjustments, I couldn't figure out what wasn't right. Today I looked at the source code and found what was tripping me up... the override parameter name should be highcharts_homepage_graphgroup and not _frontpage_ as the documentation has. Once I made the adjustment with highcharts_homepage_graphgroup = day in weewx.conf, I was able to successfully remove [homepage] from graph.conf. 

This is the second time I got tripped up by the documentation using a different/outdated override name. I'll do another source code pull request to adjust the documentation to match the current source. Anyway, on to the next adventure.

David

Colin Larsen

unread,
Jan 7, 2021, 5:45:26 PM1/7/21
to weewx-user
Nice detective work, well done sorting it!

Timothy L

unread,
Jan 7, 2021, 8:11:08 PM1/7/21
to weewx...@googlegroups.com
Does your site have a public address?Curious as to what you actually did in changing the belchertown setup. I still don't  follow what the results of the changes are that you made. 

David Levine

unread,
Jan 7, 2021, 8:36:28 PM1/7/21
to weewx-user
Out of the box http://www.levinecentral.com/weather/graphs/ will show buttons for All / Homepage / Day / Week / Month / Year . Homepage and Day pages are both for the current day and show the same thing so I wanted to suppress Homepage. I copied graphs.conf.example to graphs.conf and then removed [homepage] but there were errors. You can remove [homepage] from graphs.conf but need to add highcharts_homepage_graphgroup = "day" in weewx.conf in the [[Belchertown]] / [[[extras]]] section.  I then added [yesterday] and some additional graphs to each of the graph groups. 

David
Reply all
Reply to author
Forward
0 new messages