PiConsole: Key Error 'METAR'

I’ve been using WF PiConsole for well over a year and love it…worked great. I power it up in the morning and everything boots and I power it down at night. All of a sudden it stopped. The Pi boots but the WF PiConsole won’t start. I ran start and I see the script…then it just stops and won’t display my weather station. I grabbed a new card, installed the latest Pi software, and reinstalled PiConsole and got it running again. A week later, same thing. Only boots to the Pi software and no WF at all. I tried deleting the ini file to see if it would let me re-enter the data as if it were a new install…nope. I’m using a Pi 4b with a 10” screen. The last lines in the script that’s displayed are:
KeyError: ‘METAR’
INFO ….. Closing connection
INFO ….. Connection closed

The only “warnings” displayed in the script are:
[INFO] [GL] NPOT texture support is available
WARNING: running xinput against an Xwayland server. See the xinput man page for details. (listed two times)
[INFO] [Websocket] (date and time) - Opening connection
WARNING: (same as above, listed eight times)

There seems to be a problem with getting METAR data, as others have pointed out here:

https://community.tempest.earth/t/wfpiconsole-crashing-key-error/26673/21?u=vreihen

I don’t use WF PiConsole, nor do I know if @peter is checking in here regularly from his summer outpost in Antarctica to troubleshoot this…

Hello,

I just recently started getting this error.

Traceback (most recent call last):
File “/home/bnewman/wfpiconsole/main.py”, line 613, in
wfpiconsole_app.run()
File “/home/bnewman/wfpiconsole/venv/lib/python3.12/site-packages/kivy/app.py”, line 956, in run
runTouchApp()
File “/home/bnewman/wfpiconsole/venv/lib/python3.12/site-packages/kivy/base.py”, line 574, in runTouchApp
EventLoop.mainloop()
File “/home/bnewman/wfpiconsole/venv/lib/python3.12/site-packages/kivy/base.py”, line 339, in mainloop
self.idle()
File “/home/bnewman/wfpiconsole/venv/lib/python3.12/site-packages/kivy/base.py”, line 379, in idle
Clock.tick()
File “/home/bnewman/wfpiconsole/venv/lib/python3.12/site-packages/kivy/clock.py”, line 733, in tick
self.post_idle(ts, self.idle())
File “/home/bnewman/wfpiconsole/venv/lib/python3.12/site-packages/kivy/clock.py”, line 776, in post_idle
self._process_events()
File “kivy/_clock.pyx”, line 620, in kivy._clock.CyClockBase._process_events
File “kivy/_clock.pyx”, line 653, in kivy._clock.CyClockBase._process_events
File “kivy/_clock.pyx”, line 649, in kivy._clock.CyClockBase._process_events
File “kivy/_clock.pyx”, line 218, in kivy._clock.ClockEvent.tick
File “/home/bnewman/wfpiconsole/lib/sager.py”, line 77, in fetch_forecast
threading.Thread(target=self.generate_forecast(), daemon=True).start()
^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/bnewman/wfpiconsole/lib/sager.py”, line 284, in generate_forecast
self.get_dial_setting()
File “/home/bnewman/wfpiconsole/lib/sager.py”, line 414, in get_dial_setting
METAR = self.sager_data[‘METAR’] # Closet METAR information to station location
~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: ‘METAR’
[INFO ] [Websocket ] 2026-02-22 15:09:35 - Closing connection
[INFO ] [Websocket ] 2026-02-22 15:09:35 - Connection closed

A few weeks ago I changed my CheckWX API key to 0 and that seem to fix it.

Today I noticed Wfpiconsole was not running, so I tried starting from command line and got the same error. I tried putting my CheckWX API key back in. It still gives me the same error.

Running on Pi4 system.

Tried it on Ubuntu 24.04.4 LTS with the same issue.

I even tried reinstalling on the PI4 with no change.

Any ideas?

Thanks.

Having this same error this morning. I have completed the update. No resolution. I have backed up my wfpiconsole.ini file, wiped the directory, reinstalled via the script, and no resolution.

Any pointers? Not asking anyone to fix it for me, just a nudge to the next idea to try. Thanks in advance!

Of note, I did regenerate and update my checkwx api key as well. Same results.

File “/home/pi/wfpiconsole/lib/sager.py”, line 284, in generate_forecast
self.get_dial_setting()
File “/home/pi/wfpiconsole/lib/sager.py”, line 414, in get_dial_setting
METAR = self.sager_data[‘METAR’] # Closet METAR information to station location
~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: ‘METAR’
[INFO ] [Websocket ] 2026-02-24 07:02:18 - Closing connection
[INFO ] [Websocket ] 2026-02-24 07:02:18 - Connection closed

Hi all, sorry you’re running into trouble. Something has happened with one of the APIs that the PiConsole hits to get METAR reports (CheckWX). This is causing the console to crash and not start.

Unfortunately I am currently travelling back from Antarctica and don’t have any means to troubleshoot the issue. I will try and get to it as soon as I can.

In the mean time, as a work around you can edit line 503 of main.py to prevent the crash from occurring. Replace self.app.Sched.sager = … with #self.app.Sched.sager = …. The # turns the line into a comment and prevents it from being executed

2 Likes

No worries. I understand. I have been running using UDP in the meantime. Thank you for the update. I will make that change and get back running.

Thank you!

For me, the error is resolved. Dang nightly reboot prompted the error. If I had just left well enough alone!

I was about to make the change Peter suggested…when I started running again. Been running for the last few days.

1 Like

Hope you get frequent flyer (and floater) miles. Stay warm !