-
Notifications
You must be signed in to change notification settings - Fork 443
Closed
Labels
Type: BugSomething is not working like it shouldSomething is not working like it should
Description
What went wrong?
Caught a bug in the 22Z.TXT metar file from the tgftp server. I have attached the file that is causing the error. I'm unable to open the metar file at all. It will last the entire hour until the next metar hour is produced.
Operating System
Linux
Version
1.2.0
Python Version
3.8
Code to Reproduce
import metpy
from metpy.io import metar
df_metar = metar.parse_metar_file('22Z.TXT')Errors, Traceback, and Logs
Traceback (most recent call last):
File "/home/wxbinge/fewx/scripts/radar/pyscripts/national_composite_archival.py", line 524, in <module>
df_metar = metar.parse_metar_file('%s/%s' % (metar_dir,nt))
File "/home/wxbinge/.local/lib/python3.8/site-packages/metpy/io/metar.py", line 381, in parse_metar_file
return _metars_to_dataframe(filter(lambda m: len(m) > 25, full_metars(myfile)),
File "/home/wxbinge/.local/lib/python3.8/site-packages/metpy/io/metar.py", line 442, in _metars_to_dataframe
metars.append(parse_metar(metar, year=year, month=month))
File "/home/wxbinge/.local/lib/python3.8/site-packages/metpy/io/metar.py", line 241, in parse_metar
visibility += int(num) / int(denom)
ZeroDivisionError: division by zeroMetadata
Metadata
Assignees
Labels
Type: BugSomething is not working like it shouldSomething is not working like it should