Weewx Seasons Skin Monthly & Yearly Reports dropdown menus do not work

120 views
Skip to first unread message

ExprmntAl

unread,
Dec 26, 2020, 11:22:52 PM12/26/20
to weewx-user
I noticed a few months ago that the Seasons Skin dropdown menus for the NOAA MOnthly and Yearly reports did not work, and wondered if I had broken something in Weewx along the way, but I just did a fresh install of Weewx a few days ago and noticed that the dropdown menus for the NOAA Monthly and Yearly reports still did not work properly in the Chromium Browser in Raspberry Pi OS (Buster).  It seems like the address for the files has some extra text in it highlighted below:

file:///var/www/html/weewx/tabular.html?report=NOAA/NOAA-2020.txt

If I remove the highlighted text, the link correctly pulls up the file.  Has anyone else noticed this?  Does the Seasons Skin Index.html file need to be modified to correct this or is there a more appropriate way?

Tom Keffer

unread,
Dec 27, 2020, 7:35:48 AM12/27/20
to weewx-user
Chrome does not allow access to local files from Javascript unless you give it explicit permission. You have two options: (1) run a local webserver; or (2) give it permission:

google-chrome --allow-file-access-from-files

-tk

--
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/5f3da712-da28-4a85-88b8-f8dd2ee42d97n%40googlegroups.com.

ExprmntAl

unread,
Dec 27, 2020, 11:08:46 AM12/27/20
to weewx-user
Hi TK.  What is the function of the "tabular.html?report=" portion of the address?  Is this something that gets filled in when you have a webserver installed?  When I remove this portion of the address and hit enter, Chromium Browser opens the file.   This address works without setting any permissions - "file:///var/www/html/weewx/NOAA/NOAA-2020.txt".

I will re-install a webserver when I re-install my weewx-weather34 extension and see if that works at some point when I get some time.  I have to re-read the thread a few months ago where you helped me through that process. ;)

mwall

unread,
Dec 27, 2020, 3:18:27 PM12/27/20
to weewx-user
On Sunday, December 27, 2020 at 11:08:46 AM UTC-5 72604... wrote:
Hi TK.  What is the function of the "tabular.html?report=" portion of the address?  Is this something that gets filled in when you have a webserver installed?  

the javascript in tabular.html uses the 'report=xxx' to determine which NOAA file should be displayed.  when you read tabular.html directly (i.e., no web server), your browser interprets the javascript but refuses to open the file, since most browsers now consider opening a file to be a nefarious activity.

it just happens that the path is 'NOAA/xxx' so that when you remove the '?report=' the url is simply a path, not a path plus cgi arguments.

ExprmntAl

unread,
Dec 28, 2020, 8:31:18 AM12/28/20
to weewx-user
Thanks for the explanation mwall!  I will install apache2 and see what happens.

ExprmntAl

unread,
Dec 29, 2020, 12:37:29 AM12/29/20
to weewx-user
Just to close out this thread, I installed apache2 and the monthly and yearly reports now open as promised from the Seasons Skin webpage in all browsers/machines on my local network using "http://localhost/weewx".  

Thanks again to TK and mwall for taking the time to explain this to me!

Cheers!

ExprmntAl
Reply all
Reply to author
Forward
0 new messages