prueker / METARMap

Raspberry Pi project to visualize flight conditions on a map using WS8211 LEDs addressed via NeoPixel
MIT License
118 stars 72 forks source link

Error in metar.py #65

Open mhcrowder opened 3 months ago

mhcrowder commented 3 months ago

I've just started receiving the following error (within the last 3 days)

Traceback (most recent call last): File "/home/metarmap/metar.py", line 273, in print(stationId + ":" ^^^^^^^^^^^^^^^ TypeError: can only concatenate str (not "NoneType") to str

Right before this error it is decoding METARs.

KCTZ:VFR:360°@4kts:10SM::24/17:30.01:False

I'm not a coder so would appreciate assistance. It's been running fine for months then this started.

sean-smith commented 2 weeks ago

This means the variable stationId is returning None. Taking a look at where it sources stationId: https://github.com/prueker/METARMap/blob/1676181ab48ac5b689b0ad4d8fbfc5448ff89cf5/metar.py#L167 it looks like the API is getting incorrect data for a specific airport. I would check the airport after KCTZ on https://aviationweather.gov/data/metar/ to make sure it's reporting.