Weewx Responsive Skin - Aus Forecast Extension

257 views
Skip to first unread message

Darryn Capes-Davis

unread,
Feb 6, 2021, 4:41:16 AM2/6/21
to weewx-user
Hi All,

Long time since my last post. A few months ago I noticed that my iPhone stopped showing the BOM Forecast icons. With the change to everything needing to be HTTPS, the BOM HTTP only icons will only continue to disappear if you host the Responsive skin on HTTPS, like I do at https://carlingfordweather.sydney, and you use a modern strict browser. 

So I took time to source some weather icons and adjust and size to suit the Aus Forecast part of the Responsive skin. The changes have been push to GitHub - https://github.com/dcapslock/weewx-responsive-skin

Also included is some exception handling to mark corrupt downloaded forecast files as stale.

Regards

Darryn Capes-Davis

Greg from Oz

unread,
Feb 6, 2021, 6:52:28 AM2/6/21
to weewx-user
Yes my icons disappeared as my site is https but I changed a setting on the browser just for my site.

On chrome it is called insecure content. 

Then the icons came back again.

Greg from Oz

unread,
Feb 4, 2026, 12:54:48 AMFeb 4
to weewx-user
The forecast and the weather warning were causing the Responsive skin to crash.
Darryn has fixed the crashes and now everything is working again.


This new BOM website is taking a while to iron all the bugs out.


Thanks again Daryn. I still really like this skin for weewx.

Susan Mackay

unread,
Feb 10, 2026, 6:04:24 PM (8 days ago) Feb 10
to weewx-user
(I think my question follows on from Greg's answer - apologies if not)
I have just tried to reinstall the Responsive skin using Greg's link from above.
I'm using Weewx 5.0.1 (and yes, i know there are more recent versions) on a Raspberry Pi running Buster.
I've tried 2 ways and get 2 separate errors.

First:

(weewx-venv) xxxx:~/weewx-venv $ ./bin/weectl extension install https://github.com/Lint-Free-Technology/weewx-responsive-skin.git
Using configuration file /home/weewx/weewx.conf
Install extension 'https://github.com/Lint-Free-Technology/weewx-responsive-skin.git' (y/n)? y
Traceback (most recent call last):
  File "./bin/weectl", line 10, in <module>
    sys.exit(main())
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weectl.py", line 66, in main
    namespace.func(namespace)
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weectllib/__init__.py", line 121, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weectllib/extension_cmd.py", line 116, in install_extension
    ext.install_extension(namespace.source, no_confirm=namespace.yes)
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weecfg/extension.py", line 124, in install_extension
    raise IOError(f"Unknown extension type found at '{extension_path}'")
OSError: Unknown extension type found at 'https://github.com/Lint-Free-Technology/weewx-responsive-skin.git'

I think this may be more related to the WeeWx not recognising the .git extension but I'm not sure.
I copied the zip file to the Pi and got the Second error which is:

(weewx-venv) xxxx:~/weewx-venv $ ./bin/weectl extension install /mnt/pishare/weewx-responsive-skin-master.zip
Using configuration file /home/weewx/weewx.conf
Install extension '/mnt/pishare/weewx-responsive-skin-master.zip' (y/n)? y
Extracting from zip archive /mnt/pishare/weewx-responsive-skin-master.zip
Traceback (most recent call last):
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weecfg/__init__.py", line 714, in get_extension_installer
    __import__('install')
ModuleNotFoundError: No module named 'install'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./bin/weectl", line 10, in <module>
    sys.exit(main())
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weectl.py", line 66, in main
    namespace.func(namespace)
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weectllib/__init__.py", line 121, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weectllib/extension_cmd.py", line 116, in install_extension
    ext.install_extension(namespace.source, no_confirm=namespace.yes)
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weecfg/extension.py", line 138, in install_extension
    extension_name = self._install_from_file(extension_path, filetype)
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weecfg/extension.py", line 168, in _install_from_file
    extension_name = self.install_from_dir(extension_dir)
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weecfg/extension.py", line 179, in install_from_dir
    installer_path, installer = weecfg.get_extension_installer(extension_dir)
  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weecfg/__init__.py", line 716, in get_extension_installer
    raise ExtensionError("Cannot find 'install' module in %s" % extension_installer_dir)
weecfg.ExtensionError: Cannot find 'install' module in /tmp/tmpkrjxk9dm/weewx-responsive-skin-master/

What am I doing wrong?

Susan
Message has been deleted

Glenn McKechnie

unread,
Feb 10, 2026, 6:16:49 PM (8 days ago) Feb 10
to weewx...@googlegroups.com
Susan,

Just had a quick look at the origin files (both sites) and the error message is because there is no install.py file within the tree.
ie:- It doesn't install using the weectl stanza, it's not structured that way. 

It needs to be installed manually.
The skin directory is "Responsive". Place that with in the weewx skin directory and manually edit weewx.conf to point to it etc.


Cheers
 Glenn (VK3GLN)

Various WeeWx addons at
https://github.com/glennmckechnie


On Wed, 11 Feb 2026 at 10:09, Greg Reive <ubea...@gmail.com> wrote:
I think if you download the zip file and install the extension it might work? It won't like the .git extension filename.
I manually installed mine.

--
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/tsujx_iCtFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/f7b04572-fc95-437f-81df-85325a2419a0n%40googlegroups.com.


--
¯\_(ツ)_/¯

--
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 visit https://groups.google.com/d/msgid/weewx-user/CAD_tbc9LHv%3DQ_8iuKYdo70Qpg%2B2BCfvwFYZa-bONAhwCEbB%2BPA%40mail.gmail.com.

Greg from Oz

unread,
Feb 10, 2026, 6:31:01 PM (8 days ago) Feb 10
to weewx-user
That's probably why I installed it manually......:)
It was a long time ago I installed it.

Susan Mackay

unread,
Feb 11, 2026, 4:34:13 AM (8 days ago) Feb 11
to weewx-user
Thanks for the pointers.
I downloaded the .zip file (as above) and expanded it. I then copied the 'Aus' and 'Responsive' directories into the 'skins' folder.
I edited the skins.conf file to refer to my location (basically I copied the information from the old version of the file, adjusting as required).
However I now get the error:

Caught unrecoverable exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
****  maximum recursion depth exceeded
****  Traceback (most recent call last):
****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/reportengine.py", line 220, in run
****      obj.start()
****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/reportengine.py", line 409, in start
****      self.run()
****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/cheetahgenerator.py", line 163, in run
****      self.init_extensions(gen_dict[section_name])
****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/cheetahgenerator.py", line 196, in init_extensions
****      self.search_list_objs.append(klass(self))
****    File "/home/weewx/bin/user/aussearch.py", line 253, in __init__
****      generator.converter)
****    File "/home/weewx/bin/user/aussearch.py", line 422, in __init__
****      if file_stale and self.root is not None:
****    File "/home/weewx/bin/user/aussearch.py", line 439, in __getattr__
****      if self.root_node is not None:
****    File "/home/weewx/bin/user/aussearch.py", line 439, in __getattr__
****      if self.root_node is not None:
****    File "/home/weewx/bin/user/aussearch.py", line 439, in __getattr__
****      if self.root_node is not None:
****    [Previous line repeated 491 more times]
****  RecursionError: maximum recursion depth exceeded
****  Generator terminated

The relevant code (from Line 433) of aussearch.py is

    def __getattr__(self, child_or_attrib):
        # This is to get around bugs in the Python version of Cheetah's namemapper:
        if child_or_attrib in ['__call__', 'has_key']:
            print("aussearch: XmlFileHelper file: %s, __getattr__ called for %s" % (self.xml_file, child_or_attrib))
            raise AttributeError
       
        if self.root_node is not None:
            return getattr(self.root_node, child_or_attrib)
        else:
            raise AttributeError

with line 439 being:

        if self.root_node is not None:

My 'guess' is that the attempt to get "self.root_node" is recursively calling the "__getattr__" function

Any idea what is hapening here?

Carlingford Weather

unread,
Feb 11, 2026, 4:38:09 AM (8 days ago) Feb 11
to weewx...@googlegroups.com
You are running the old aussearch.py. The download Aus folder contains the newer version and needs to go whether your use bin files are.

When I wrote the skin and extension the install.py method was quite new and hence no install. Plus it is also both a skin and an extension and I am not sure install.py can handle that.

Greg from Oz

unread,
Feb 11, 2026, 4:47:21 AM (8 days ago) Feb 11
to weewx-user
The new aussearch.py has to go into where your other user scripts are. Like bin/user folder in the weewx structure.

Susan Mackay

unread,
Feb 11, 2026, 7:13:27 PM (7 days ago) Feb 11
to weewx-user
OK - now I'm properly confused.
I deleted all 'aussearch.py' files and copied the downloaded file into bin/user. (I know that the Python system found it as it created a corresponding .pyc file in __pycache__). However the error was the same.
So I deleted that and downloaded the file again from https://github.com/Lint-Free-Technology/weewx-responsive-skin/blob/master/Aus/aussearch.py. Github shows that the file was edited 2 weeks ago so I take it that this is the latest version.
Again the same error.
So I edited the file to include a couple of print statements just before the reference to 'self.root_node', one of which tried to print out the value. The recursion occurred on that print statement.
Am I copying the correct 'aussearch.py' version and, if not, where is it?
Susan (VK3ANZ)

Carlingford Weather

unread,
Feb 11, 2026, 7:18:22 PM (7 days ago) Feb 11
to weewx...@googlegroups.com
Check if you have old cache files the specified or default aussearch cache location. 


Sent: Thursday, February 12, 2026 11:13:27 AM

To: weewx-user <weewx...@googlegroups.com>
Subject: Re: [weewx-user] Re: Weewx Responsive Skin - Aus Forecast Extension

Greg from Oz

unread,
Feb 11, 2026, 7:29:07 PM (7 days ago) Feb 11
to weewx-user
The aussearch.py dated 4th Feb is the same as I am using.
I have my weewx installed via pip and is using python 3.13. (don't know if that makes a difference or not)

Under skins/Responsive I have:
├── aussearch
├── DATA
├── font
├── icons
├── lang
├── NOAA
└── TEST

in aussearch I have:
.rw-r--r--  649k root 2026-02-12 09:51 IDN11060.xml
.rw-r--r--  7.8k root 2026-02-12 09:55 IDN11113.xml
.rw-r--r--  129k root 2026-02-12 11:11 IDN60801.95762.json
.rw-r--r--  2.2k root 2026-02-12 11:11 IDZ00054.warnings_nsw.xml

And they are being updated as you can tell by the time stamp.

Greg from Oz

unread,
Feb 11, 2026, 7:35:00 PM (7 days ago) Feb 11
to weewx-user
Did you uncomment this bit in the skin.conf?

# To use the aussearch extensions in this skin
    # you need to have downloaded Auusearch user extension as per
    # https://github.com/dcapslock/weewx-responsive-skin/wiki/Australian-%27Search%27-Extensions
    # end then uncomment the line below
    # search_list_extensions = user.aussearch.ausutils

Susan Mackay

unread,
Feb 12, 2026, 4:36:04 AM (7 days ago) Feb 12
to weewx-user
@Greg - yes I did uncomment that line, a long time ago as the original installation (2020???) was working well.
I've also tried updating WeeWx to V5.2.0 to see if that made a difference - nope.
For fun, I've comment out all of the __getattr__ function and the error message is now:

Caught unrecoverable exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
****  'XmlFileHelper' object has no attribute 'root'

****  Traceback (most recent call last):
****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/reportengine.py", line 248, in run
****      obj.start()
****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/reportengine.py", line 465, in start

****      self.run()
****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/cheetahgenerator.py", line 163, in run
****      self.init_extensions(gen_dict[section_name])
****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/cheetahgenerator.py", line 196, in init_extensions
****      self.search_list_objs.append(klass(self))
****    File "/home/weewx/bin/user/aussearch.py", line 253, in __init__
****      generator.converter)
****    File "/home/weewx/bin/user/aussearch.py", line 422, in __init__
****      if file_stale and self.root is not None:
****  AttributeError: 'XmlFileHelper' object has no attribute 'root'
****  Generator terminated

That error had me intrigued so I went back to the 'XmlFileHelper' class and put a 'log.error' at the start of the __init__ function to print out the file name it was trying to process. the result is:

ERROR user.aussearch: >>> xml_file is ftp://ftp.bom.gov.au/anon/gen/fwo/IDV10753.xml
ERROR user.aussearch: >>> xml_file is ftp://ftp.bom.gov.au/anon/gen/fwo/IDV10751.xml
ERROR user.aussearch: >>> xml_file is http://www.bom.gov.au/fwo/IDZ00059.warnings_vic.xml
ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
ERROR weewx.reportengine:         ****  'XmlFileHelper' object has no attribute 'root'
ERROR weewx.reportengine:         ****  Traceback (most recent call last):
ERROR weewx.reportengine:         ****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/reportengine.py", line 248, in run
ERROR weewx.reportengine:         ****      obj.start()
ERROR weewx.reportengine:         ****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/reportengine.py", line 465, in start
ERROR weewx.reportengine:         ****      self.run()
ERROR weewx.reportengine:         ****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/cheetahgenerator.py", line 163, in run
ERROR weewx.reportengine:         ****      self.init_extensions(gen_dict[section_name])
ERROR weewx.reportengine:         ****    File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/cheetahgenerator.py", line 196, in init_extensions
ERROR weewx.reportengine:         ****      self.search_list_objs.append(klass(self))
ERROR weewx.reportengine:         ****    File "/home/weewx/bin/user/aussearch.py", line 253, in __init__
ERROR weewx.reportengine:         ****      generator.converter)
ERROR weewx.reportengine:         ****    File "/home/weewx/bin/user/aussearch.py", line 424, in __init__
ERROR weewx.reportengine:         ****      if file_stale and self.root is not None:
ERROR weewx.reportengine:         ****  AttributeError: 'XmlFileHelper' object has no attribute 'root'
ERROR weewx.reportengine:         ****  Generator terminated

I assume the error occurred in the last file listed but that file does exist on the web site:

<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>Weather Warnings for Victoria. Issued by the Australian Bureau of Meteorology</title>
<atom:link href="http://www.bom.gov.au/fwo/IDZ00059.warnings_vic.xml" rel="self" type="application/rss+xml"/>
<description>Current weather warnings for Victoria, Australia including strong wind, gale, storm force and hurricane force wind warnings; tsunami; damaging waves; abnormally high tides; tropical cyclones; severe thunderstorms; severe weather; fire weather; flood; frost; driving; bushwalking; sheep graziers and other agricultural warnings.</description>
<language>en-au</language>
<copyright>Copyright: (C) Copyright Commonwealth of Australia 2010, Bureau of Meteorology (ABN 92637 533532), see http://www.bom.gov.au/other/copyright.shtml for terms and conditions of reuse.</copyright>
<webMaster>web...@bom.gov.au (Help desk)</webMaster>
<pubDate>Thu, 12 Feb 2026 08:27:29 GMT</pubDate>
<lastBuildDate>Thu, 12 Feb 2026 08:27:29 GMT</lastBuildDate>
<generator>Australian Bureau of Meteorology</generator>
<ttl>10</ttl>
<image>
<title>Weather Warnings for Victoria. Issued by the Australian Bureau of Meteorology</title>
</image>
<item>
<title>12/16:15 EDT Marine Wind Warning Summary for Victoria</title>
<pubDate>Thu, 12 Feb 2026 05:15:17 GMT</pubDate>
<guid isPermaLink="false">http://www.bom.gov.au/vic/warnings/marinewind.shtml</guid>
</item>
</channel>
</rss>

The first 2 files mentioned above are in the weewx-cache/aussearch folder but the 3rd one (the 'VIC_WARNINGS' in the skins.conf file) isn't. Therefore the file will be marked as 'stale' (line 409) and an attempt is made to download the file. However (changing a few of the 'log.debug' to 'log.error' calls) the 'FileFetch.fetch()' fails with:

ERROR user.aussearch: >>>> aussearch: bad file download xml file http://www.bom.gov.au/fwo/IDZ00059.warnings_vic.xml: Bad response 301 for url http://www.bom.gov.au/fwo/IDZ00059.warnings_vic.xml

which is caught in the 'except' clause. The problem is that this completely bypasses any place where 'self.root' is defined. The solution is to add a 'self.root = None' just below the 'if file_stale: where it tries to read the file.
The same is true for the 'JsonFileHelper' class.
I don't know why the files are not being downloaded (the '301' error response) but at least this stops the reporter crashing.

(Apologies for the length of this post but I was working through the issue as I wrote it.)

Carlingford Weather

unread,
Feb 12, 2026, 5:02:08 AM (7 days ago) Feb 12
to weewx...@googlegroups.com
Susan,

Can you copy this to an issue on GitHub (https://github.com/Lint-Free-Technology/weewx-responsive-skin/issues). Easier to track and discuss than in email. Thanks.

Setting self.root = None where you suggest stops using the cache file if a download fails - that is why self.root is only set to None once a file has been downloaded (and if failed goes via the exception path). So what is puzzling here is why is self.root incorrect, which suggests a bad cache file like I suggested earlier.

Anyhow, we can discuss further on GitHub issue.

Thanks

Darryn

Greg from Oz

unread,
Feb 12, 2026, 4:54:05 PM (6 days ago) Feb 12
to weewx-user
Are you running a fresh install or upgrading a working weewx site?
I was upgrading my working weewx site and I had errors after using the new aussearch.py and there are changes to the template pages that the new ausseach needs.
Check the forecast and index tmpl etc that you are using to the ones in the zip file latest files using meld or vimdiff as there were changes to the logic in those pages. There was a if/end statement that was in the wrong place.
I don't know if the errors you are seeing were the same as I was getting.
Darryn helped a lot and fixed up all the errors I had. My programming skills are not up that level to debug.

Susan Mackay

unread,
Feb 12, 2026, 5:55:03 PM (6 days ago) Feb 12
to weewx-user
@Darryn - I've created the issue. In my case the combination of not downloading the file and not having a cached file means the self.root and self.root_node variables are never defined.

@Greg - I upgraded WeeWx but I have also edited the various files as required for the new version of ausearch.

I suspect that there is something going on on the BoM side with their new restrictions, especially of downloading http(s) files. I tried to download the local warnings XML file (which has an http:// prefix) in my browser and it works. However using curl give me a message about trying to screen-scrape and wget gives me a 403 (forbidden) error.

Thanks for the on-going interest.

Greg from Oz

unread,
Feb 12, 2026, 6:10:36 PM (6 days ago) Feb 12
to weewx-user
Do the errors go away if you set:
use_warn = 0
At least the the webpages will get generated.

John Smith

unread,
Feb 12, 2026, 7:11:35 PM (6 days ago) Feb 12
to weewx...@googlegroups.com
However using curl give me a message about trying to screen-scrape and wget gives me a 403 (forbidden) error.

That started happening long before the new website was launched and if you give curl a browser user-agent string it will work. 

Susan Mackay

unread,
Feb 12, 2026, 9:09:23 PM (6 days ago) Feb 12
to weewx-user
@Greg - for some reason setting use_warn = 0 (and restarting WeeWx) didn't make any difference
@Darryn - thanks for the updated file. I've updated the github issue with my latest findings.

Reply all
Reply to author
Forward
0 new messages