NOAA drop downs not populating when search_list_extensions = user.forecast.ForecastVariables

246 views
Skip to first unread message

Paul Oversmith

unread,
Jun 18, 2016, 10:31:15 AM6/18/16
to weewx-user
My NOAA drop down menus are not populating when search_list_extensions = user.forecast.ForecastVariables is used.

I tried this on the standard unmodified skin and verified that this is the action.

it looks like
#for $monthYear in $SummaryByMonth
            <option value="$monthYear">$monthYear</option>
 #end for 
is not finding any values (checked the generated HTML and found the population was missing

tested with standard reports
     when search_list_extensions = user.forecast.ForecastVariables was added to the [CheetahGenerator] section the drop down lists were not populated.
    when search_list_extensions = user.forecast.ForecastVariables was removed, the drop down lists were populated,

I tried adding user.extstats.ExtStatsVariables to the search_list_estensions but it returned a file not found error, so I guess it was an example of how to add things to the search list.

Is this a bug or am I doing something wrong?

mwall

unread,
Jun 18, 2016, 11:43:55 AM6/18/16
to weewx-user
On Saturday, June 18, 2016 at 10:31:15 AM UTC-4, Paul Oversmith wrote:
tested with standard reports
     when search_list_extensions = user.forecast.ForecastVariables was added to the [CheetahGenerator] section the drop down lists were not populated.
    when search_list_extensions = user.forecast.ForecastVariables was removed, the drop down lists were populated,

I tried adding user.extstats.ExtStatsVariables to the search_list_estensions but it returned a file not found error, so I guess it was an example of how to add things to the search list.

Is this a bug or am I doing something wrong?

i just tried it and it worked fine (weewx 3.5.0, forecast 3.1.0).  in skin.conf:

[CheetahGenerator]
    search_list_extensions = user.forecast.ForecastVariables

the noaa dropdowns are populated.

what does the log say?  could you post the skin.conf?

as for extended status, if you are using the extension that is included in weewx, you must have xstats.py in the user directory then use:

    search_list_extensions = user.xstats.ExtendedStatistics

m

Oversmith, Paul

unread,
Jun 18, 2016, 1:40:34 PM6/18/16
to weewx...@googlegroups.com
I could not see any error messages in the log
When I had the problem with my custom skin (that has forecasting on a separate page from the NOAA drop downs I added the standard skin for testing.
The drop down worked on the standad skin, so I started looking for problems in my skins and found  search_list_extensions list changed the drop down behaviour ( with user.forecast.ForecastVariables no drop down, with user.forecast.ForecastVariables drop downs0
so I tried the standard skin to eliminate issues with my skin and found if I added search_list_extensions = user.forecast.ForecastVariables to the standard skin and the drop down stopped working.

The standard skin did not have forecasting pages added and was not setup for forecasting - 

When I removed search_list_extensions = user.forecast.ForecastVariables from my custom skin, the NOAA drop downs came back, but the forecasting pages were gone.

I have attached my skins and the config files

Thanks in advanced for the help

Paul Oversmith

E-Mail: p...@overweb.com
Phone: (941) 266-3600

--
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/p1AYCf0KkxI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

log file.txt
Stanford.zip
Standard.zip
weewx.conf

Oversmith, Paul

unread,
Jun 18, 2016, 1:46:26 PM6/18/16
to weewx...@googlegroups.com
by the way. in all cases the NOAA txt files are generated.  It is just the drop down lists that are not populated.
The skin code looks correct, but when I look at the html - the code for building the drop down list is not there. So it seems to be a problem with
#for $monthYear in $SummaryByMonth
            <option value="$monthYear">$monthYear</option>
#end for
not getting values

Paul Oversmith

E-Mail: p...@overweb.com
Phone: (941) 266-3600

mwall

unread,
Jun 18, 2016, 5:57:41 PM6/18/16
to weewx-user
On Saturday, June 18, 2016 at 1:46:26 PM UTC-4, Paul Oversmith wrote:
by the way. in all cases the NOAA txt files are generated.  It is just the drop down lists that are not populated.

paul,

have you made modifications to the forecast.py code? what changes to python code in weewx itself?

m

Oversmith, Paul

unread,
Jun 18, 2016, 11:44:59 PM6/18/16
to weewx...@googlegroups.com
I did make some changes to some of the code - I will try it with the stock version tomorrow to see if my code changes created the problem.
Don't spend any time on my problem until I confirm that I didn't create it.

Most of the changes were to eliminate success logging.
Specifically, I added   if weewx.log_success:     # 6-6-16 PGO ahead of any loginf message that would be logged if it was a success
Did this to keep the log files short and eliminate some SD writes.
I did add PGO to the version number of any changed code.

I made similar changes to some other code - the biggest change was in the Units program, as I added a number of new data elements
modified Forecasting attached


Paul Oversmith

E-Mail: p...@overweb.com
Phone: (941) 266-3600

--
forecast.py

Oversmith, Paul

unread,
Jun 20, 2016, 10:14:20 PM6/20/16
to weewx...@googlegroups.com
I did some more testing.
The standard skin works - drop downs are populated.
When I move the standard skin index page into my skin, which is based on exfoliation the drop downs stop showing up.
When the forecasting search extension is removed. the drop downs show up.
I have another issue that might be related.  The lastest.xxx. seems to show when there is current data, but is not shown if there is no current data.

So I think somehow the search list is screwed up.
  • Is there a way I can view what is in the full search list?  That would help determine if the problem is in building the list or using the list.
  • The only really changed code is units.py and that is used to generate the search list.  It is possible I did something wrong when I added data elements and data types to the database. 
  • I left programming before classes became popular. And although I understand the general concepts, i don't understand Pythons implementation.
Any help you can give me to point me in the right direction to find the problem would be helpfull.
I doubt if the problem is in the base code, since it works with the standard skin.  It most likely has to do with either my skin modifications or the changes to units.py.

Paul Oversmith

E-Mail: p...@overweb.com
Phone: (941) 266-3600

mwall

unread,
Jun 21, 2016, 11:01:46 AM6/21/16
to weewx-user


On Monday, June 20, 2016 at 10:14:20 PM UTC-4, Paul Oversmith wrote:
I did some more testing.
The standard skin works - drop downs are populated.
When I move the standard skin index page into my skin, which is based on exfoliation the drop downs stop showing up.
When the forecasting search extension is removed. the drop downs show up.
I have another issue that might be related.  The lastest.xxx. seems to show when there is current data, but is not shown if there is no current data.

So I think somehow the search list is screwed up.
  • Is there a way I can view what is in the full search list?  That would help determine if the problem is in building the list or using the list.
  • The only really changed code is units.py and that is used to generate the search list.  It is possible I did something wrong when I added data elements and data types to the database. 
  • I left programming before classes became popular. And although I understand the general concepts, i don't understand Pythons implementation.
Any help you can give me to point me in the right direction to find the problem would be helpfull.
I doubt if the problem is in the base code, since it works with the standard skin.  It most likely has to do with either my skin modifications or the changes to units.py.

its hard to say without seeing the code, or at least a diff between your code and stock weewx.

why did you modify units.py? 

the preferred way to add units is to put the entries in user/extensions.py, or possibly in a .py file in the user directory (e.g., in a driver's python code in the user directory).  same for extending the default schema or for defining your own schemas.

if you modify code anywhere other than the user directory, those changes will be overwritten when you update/upgrade weewx.

as for search lists, take a look at initExtensions in cheetahgenerator.py.  add a log/print statement to see what is specified and what is actually loaded.

m

Oversmith, Paul

unread,
Jun 21, 2016, 1:30:15 PM6/21/16
to weewx...@googlegroups.com
Thanks

I know I should have not modified code, but when I started, I didn't really understand how the overlay works.

I will try to pull the code changes out and put them where they belong.
The changes I made to units.py were to add new fields to the database and remove standard fields that were not used. and the fields came new groups and conversions.

In any case I have found a work around - I replaced the drop down generation in the skin with code that directly generated them with #for loops.

I will be remote to the Pi for a couple of months, so I will not change code during that time.

Thanks for the help.

Paul Oversmith

E-Mail: p...@overweb.com
Phone: (941) 266-3600

--

Fernando Estrada

unread,
Aug 3, 2016, 2:36:27 PM8/3/16
to weewx-user
I have the same problem. But I have not modified phyton code. I have only translated the html labels of the template. While debugging I printed the $SummaryByMonth variable and only obtain [] as a result when the forecast search list extension parameter is included. When the parameter is erased the variable is populated. The skin.conf looks like

[CheetahGenerator]
    # This section is used by the generator CheetahGenerator, and specifies
    # which files are to be generated from which template.
    # Possible encodings are 'html_entities', 'utf8', or 'strict_ascii'
    encoding = html_entities

    search_list_extensions = user.forecast.ForecastVariables

    [[SummaryByMonth]]
        # Reports that summarize "by month"
        [[[NOAA_month]]]
            encoding = utf8
            template = NOAA/NOAA-YYYY-MM.txt.tmpl

    [[SummaryByYear]]
        # Reports that summarize "by year"
        [[[NOAA_year]]]
            encoding = utf8
            template = NOAA/NOAA-YYYY.txt.tmpl
       
    [[ToDate]]
        # Reports that show statistics "to date", such as day-to-date,
        # week-to-date, month-to-date, etc.
        [[[day]]]
            template = index.html.tmpl
       
        [[[week]]]
            template = week.html.tmpl
       
        [[[month]]]
            template = month.html.tmpl
       
        [[[year]]]
            template = year.html.tmpl
           
        [[[RSS]]]
            template = RSS/weewx_rss.xml.tmpl

        [[mapa]]
            template = mapa.html.tmpl

I am using the sofaskin templates so it is not a new template.

I am incluing in this post the skin.conf   and index.html.txt for sofaskin and the weewx.conf (I eliminated my IP addresses and passwords in this file for security reasons) in the weewx root folder.

thanks in advance

Fernando
index.html.tmpl
skin.conf
weewx.conf

J.L. Blom

unread,
Aug 8, 2016, 9:56:00 AM8/8/16
to weewx...@googlegroups.com

Just a related question: Where did you get the index.html.tmpl from as
it is not in the .zip file only index.html
Joep
> */Paul Oversmith/*
>
> E-Mail: p...@overweb.com <javascript:>
> Phone: (941) 266-3600
>
> On Tue, Jun 21, 2016 at 11:01 AM, mwall
> <mw...@users.sourceforge.net <javascript:>> wrote:
>
>
>
> On Monday, June 20, 2016 at 10:14:20 PM UTC-4, Paul Oversmith
> wrote:
>
> I did some more testing.
> The standard skin works - drop downs are populated.
> When I move the standard skin index page into my skin,
> which is based on exfoliation the drop downs stop showing up.
> When the forecasting search extension is removed. the drop
> downs show up.
> I have another issue that might be related. The
> lastest.xxx. seems to show when there is current data, but
> is not shown if there is no current data.
>
> So I think somehow the search list is screwed up.
>
> * Is there a way I can view what is in the full search
> list? That would help determine if the problem is in
> building the list or using the list.
> * The only really changed code is units.py and that is
> used to generate the search list. It is possible I
> did something wrong when I added data elements and
> data types to the database.
> * I left programming before classes became popular. And
> <https://groups.google.com/d/topic/weewx-user/p1AYCf0KkxI/unsubscribe>.
> To unsubscribe from this group and all its topics, send an
> email to weewx-user+...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> 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
> <mailto:weewx-user+...@googlegroups.com>.

Andrew Milner

unread,
Aug 8, 2016, 10:24:57 AM8/8/16
to weewx-user
Not in which zip file and not in which directory??  The templates 'live' in the skins directory (and sub directories) whilst the html files 'live' in the public_html directory (and corresponding sub directories)

Fernando Estrada

unread,
Aug 9, 2016, 11:07:38 AM8/9/16
to weewx-user
As Andrew mention, the index.html.tmpl and skin.conf are in the skin folder (in my case sofaskin). The weewx.conf is in the root folder for the application. As it was mentioned before the problem is when the forecast extension is enabled.
Reply all
Reply to author
Forward
0 new messages