Weewx crashes on a clean install

113 views
Skip to first unread message

Phil W7PJH

unread,
Aug 6, 2025, 8:08:11 PM8/6/25
to weewx-user
Greetings to everyone.

I am trying to get Weewx up and running on a new clean install.  I using a new Raspberry Pi 5 with 8 GBs and a 512 GB Nvme drive. I installed the last Raspberry Pi OS.  Also, I have updated software several times. I don't know the brand of my weather station but I am capturing data on 433.923 MHz (please see the attached files for examples).  I also have a Raspberry Pi 4 with a SATA drive where I have been running all of the software successfully for 3-4 months.  This system broke and I decided to do a clean install on a RPi 5. 

I have installed rtl-sdr, rtl_433, weewx and weewx-aprs extension.  My goal is to add Direwolf to broadcast the weather data via APRS on VHF.  Finally I hope to add a separate barometric sensor (BME280) and add this data to the output stream on APRS.

The problem is that I run Weewx, either on the command line or as a service, and it crashes after 1-3 minutes.  I have attached logs and weewx.conf.

My Python knowledge is at beginner level and I am lost trying to decipher the error message.  Please help!!

Thank you!

Phil  W7PJH
weewx.conf
Command line output
Journalctl file

vince

unread,
Aug 6, 2025, 9:25:29 PM8/6/25
to weewx-user
From your logs....

  File "/etc/weewx/bin/user/aprs.py", line 80, in _handle_new_archive_record
    data.append('g%03.f' % record['wind_average'])
                           ~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'wind_average'



Aug 06 14:50:16 Pi5 weewxd[250692]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/aprs.py", line 80, in _handle_new_archive_record
Aug 06 14:50:16 Pi5 weewxd[250692]: CRITICAL __main__:     ****      data.append('g%03.f' % record['wind_average'])
Aug 06 14:50:16 Pi5 weewxd[250692]: CRITICAL __main__:     ****                             ~~~~~~^^^^^^^^^^^^^^^^
Aug 06 14:50:16 Pi5 weewxd[250692]: CRITICAL __main__:     ****  KeyError: 'wind_average'
Aug 06 14:50:16 Pi5 weewxd[250692]: CRITICAL __main__:     ****  Exiting.

It's a little difficult to reverse engineer this without knowing which aprs.py you are running and where you got it from,  and if it's Gary's old extension he has apparently gone dark and deleted all his github repos. I'm guessing you're running an old copy you had stashed somewhere perhaps.
 
See if this thread helps any......

Phil W7PJH

unread,
Aug 8, 2025, 11:49:18 AM8/8/25
to weewx-user
Hi Vince!

I didn't go off into the sunset.  Rather I used the great suggestion that you made with the thread URL.  The information was spot on if a little dated.  The result of making the changes to the aprs.py code resolved the errors.

Then on to the next problem...permissions.  The aprs.py scripts writes a file out that can be used to put the weather data on arps.fi.  It errored out since it didn't have permissions on the directory.  So, I used a two pound hammer and changed the directory owner and group to pi (my user) which is in the root and sudo groups.  Not much finesse but effective.  The RPi is only on my internal network, so I not concerned about the security.  The result is that all of the errors disappeared and I had the required output file.

Thanks for pointing me in the right direction.  The problem was resolved.  And I learned some more about Python.

Phil
W7PJH
Reply all
Reply to author
Forward
0 new messages