Error in metar.py
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.
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.