forecast crashes when adding first Zambretti recode on clean database

98 views
Skip to first unread message

Alan

unread,
Jun 26, 2025, 8:25:37 PM6/26/25
to weewx-user
I have used weewx for many years on linux (currently Almalinux 9.6 with a Vantage station and using mysql).

I have recently upgraded from 4.4.0 to 5.1.0 of which I have done a clean install.

Everything works except the Zambretti forecast does not add its 9am record. I use a seperate forecast database with archive table containing the zcode.
I had copied across the forecast table from 440. In an effort to have a clean start I deleted the forecast/archive table.
This recreated successfully on a weewx restart. However when it tries to add the first record it crashes (see log below).

If I add one archive record containing  a zcode it does not crash but then it never add a 9am record either.

It obviously has access to the database as it recreates the archive table OK.

The extensions were installed with: wget -O weewx-forecast.zip https://github.com/matthewwall/weewx-forecast/archive/master.zip

Jun 23 14:56:45 kakapo weewxd[102789]: INFO weewx.manager: Added record 2025-06-05 20:20:00 NZST (1749111600) to daily summary in 'weewx510'
Jun 23 14:56:45 kakapo weewxd[102789]: INFO weewx.engine: Main loop exiting. Shutting engine down.
Jun 23 14:56:46 kakapo weewxd[102789]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd.py", line 127, in main
Jun 23 14:56:46 kakapo weewxd[102789]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 174, in run
Jun 23 14:56:46 kakapo weewxd[102789]: CRITICAL __main__:     ****      self.dispatchEvent(weewx.Event(weewx.STARTUP))
Jun 23 14:56:46 kakapo weewxd[102789]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
Jun 23 14:56:46 kakapo weewxd[102789]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 612, in startup
Jun 23 14:56:46 kakapo weewxd[102789]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 728, in _catchup
Jun 23 14:56:46 kakapo weewxd[102789]: CRITICAL __main__:     ****      self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD,
Jun 23 14:56:46 kakapo weewxd[102789]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
Jun 23 14:56:46 kakapo weewxd[102789]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/forecast.py", line 1212, in update_forecast
Jun 23 14:56:46 kakapo weewxd[102789]:  File "/usr/share/weewx/weewxd.py", line 226, in <module>
Jun 23 14:56:46 kakapo weewxd[102789]:  File "/usr/share/weewx/weewxd.py", line 127, in main
Jun 23 14:56:46 kakapo weewxd[102789]:  File "/usr/share/weewx/weewx/engine.py", line 174, in run
Jun 23 14:56:46 kakapo weewxd[102789]:    self.dispatchEvent(weewx.Event(weewx.STARTUP))
Jun 23 14:56:46 kakapo weewxd[102789]:  File "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
Jun 23 14:56:46 kakapo weewxd[102789]:  File "/usr/share/weewx/weewx/engine.py", line 612, in startup
Jun 23 14:56:46 kakapo weewxd[102789]:  File "/usr/share/weewx/weewx/engine.py", line 728, in _catchup
Jun 23 14:56:46 kakapo weewxd[102789]:    self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD,
Jun 23 14:56:46 kakapo weewxd[102789]:  File "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
Jun 23 14:56:46 kakapo weewxd[102789]:  File "/etc/weewx/bin/user/forecast.py", line 1212, in update_forecast
Jun 23 14:56:46 kakapo systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE

Any suggestions?

Thanks
Alan

John Kline

unread,
Jun 26, 2025, 9:01:33 PM6/26/25
to weewx...@googlegroups.com, weewx-user
Trying again to send.  It was rejected because of my link!

On Jun 26, 2025, at 5:59 PM, John Kline <jo...@johnkline.com> wrote:


The extension you installed– https://github.com/matthewwall/weewx-forecast/archive/master.zip–won’t work with WeeWX 4.x or WeeWX 5.x.  It hasn’t been updated in 6 years.

Try:

On Jun 26, 2025, at 5:25 PM, Alan <kais...@gmail.com> wrote:

I have used weewx for many years on linux (currently Almalinux 9.6 with a Vantage station and using mysql).
--
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/646f26cd-3dc8-46dc-b008-9e464928b7d5n%40googlegroups.com.

John Kline

unread,
Jun 26, 2025, 9:03:53 PM6/26/25
to weewx...@googlegroups.com, weewx-user
The extension you attempted to install hasn’t been updated for six years.  It will not run on WeeWX 4.x, nor on WeeWX 5.x

I attempted to send you the link to the proper for of the extension that will run, but the message was blocked because of a 3rd part link!  (Apparently, we can’t send github links).

Do a search for weewx-forecast.  The fork by chaunceygardiner should come up first.  Install that one.

On Jun 26, 2025, at 5:25 PM, Alan <kais...@gmail.com> wrote:

I have used weewx for many years on linux (currently Almalinux 9.6 with a Vantage station and using mysql).
--

Jimi Lawson

unread,
Jun 26, 2025, 10:44:27 PM6/26/25
to weewx-user
Just for info, there's a slightly newer version of  weewx-forecast (3.4.0b12) that works ok on Weewx version 4.10.2, I'm using it on my station at the moment, with no problems, can't say if it works for weewx 5.x
Regards
Jimi

Jimi Lawson

unread,
Jun 27, 2025, 5:53:54 AM6/27/25
to weewx-user
Further to my previous post, the version I mentioned is in fact from here https://github.com/chaunceygardiner/weewx-forecast/releases

Alan

unread,
Jun 28, 2025, 9:01:48 PM6/28/25
to weewx-user
Thank you for your help.

Apart from installing the wrong extension set I neglected to copy the forecast_binding over to my new weewx.conf:

I had:

    [[forecast_binding]]
        database = forecast_mysql

I needed:

    [[forecast_binding]]
        manager = weewx.manager.Manager
        schema = user.forecast.schema
        table_name = archive
        database = forecast_mysql

The default appears to be to initialize the forecast database with the full weewx schema with 114 tables
and no zcode field. This was not the case in previous versions. Is this a bug? The default forecast schema is the wrong one.

Anyway, all working now.

Thanks
Alan

vince

unread,
Jun 28, 2025, 9:58:59 PM6/28/25
to weewx-user
Looking at the forked forecast sources I see the following in install.py

                'DataBindings': {
                    'forecast_binding': {
                        'manager': 'weewx.manager.Manager',
                        'schema': 'user.forecast.schema',
                        'table_name': 'archive',
                        'database': 'forecast_sqlite'}}
,

So it'll use its own database with its own schema.   No bugs I see at all.

I use the chaunceygardiner forked forecast extension and other than editing weewx.conf and rolling my own index.html.tmpl to salt to taste, it works fine for me for many years now.
Reply all
Reply to author
Forward
0 new messages