Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes read of metar file with bad encoding #1272

Merged
merged 1 commit into from Jan 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/metpy/io/_tools.py
Expand Up @@ -27,7 +27,8 @@ def open_as_needed(filename, mode='rb'):
elif filename.endswith('.gz'):
return gzip.GzipFile(filename, mode)
else:
return open(filename, mode)
kwargs = {'errors': 'surrogateescape'} if mode != 'rb' else {}
return open(filename, mode, **kwargs)


class NamedStruct(Struct):
Expand Down
5 changes: 3 additions & 2 deletions src/metpy/static-data-manifest.txt
@@ -1,17 +1,18 @@
2020010600_sao.wmo e8f327f32d1765ae02c2c34c9393287a853a62afbf1987bf9a4f32894c7f24bd
AK-REGIONAL_8km_3.9_20160408_1445.gini 4919b80abe95a765a42a6e3904ef1e38b8be804dc52276ef5db6b587f85abd55
GFS_test.nc bd68670c5102c8085ebafe8bf301702b9b4574fbd8413a5d6ba6e0ba71efacc7
HI-REGIONAL_4km_3.9_20160616_1715.gini 30896dda51c9f933027d8086f0a86543efce12ea90a52981eccbce2e0ce1529e
KICX_20170712_1458 94bd4f795832f056f7489a5562acf76de9a9cab1694549562cc3154abb22527c
KTLX19990503_235621.gz 7a097251bb7a15dbcdec75812812e41a86c5eb9850f55c3d91d120c2c61e046e
KTLX20130520_201643_V06.gz 772e01b154a5c966982a6d0aa2fc78bc64f08a9b77165b74dc02d7aa5aa69275
KTLX20150530_000802_V06.bz2 d78689afc525c853dec8ccab4a4eccc2daacef5c7df198a35a3a791016e993b0
Level2_KFTG_20150430_1419.ar2v 77c3355c8a503561eb3cddc3854337e640d983a4acdfc27bdfbab60c0b18cfc1
TDAL20191021021543V08.raw.gz db299c0f31f1396caddb92ed1517d30494a6f47ca994138f85c925787176a0ef
Level2_FOP1_20191223_003655.ar2v 4a086f6190c0d324612922e9fcb46262c3a1d825810caa8a11aca3823db17ae3
Level2_KFTG_20150430_1419.ar2v 77c3355c8a503561eb3cddc3854337e640d983a4acdfc27bdfbab60c0b18cfc1
Level3_Composite_dhr_1km_20180309_2225.gini 19fcc0179c9d3e87c462262ea817e87f52f60db4830314b8f936baa3b9817a44
NAM_test.nc 12338ad06d5bd223e99e2872b20a9c80d58af0c546731e4b00a6619adc247cd0
NHEM-MULTICOMP_1km_IR_20151208_2100.gini c144b29284aa915e6fd1b8f01939c656f2c72c3d7a9e0af5397f93067fe0d952
SFC_obs.csv 582d434442880f8414a555f22f7faf9b07b1170f390628e68c5c182e4431f426
TDAL20191021021543V08.raw.gz db299c0f31f1396caddb92ed1517d30494a6f47ca994138f85c925787176a0ef
UPA_obs.csv 106fa93db40f32cf7cb5e969e5dacb3d4e3387f7a3379ba90cc15149754fc640
WEST-CONUS_4km_WV_20151208_2200.gini 6851b49d20de2ee3e6fc0ef86e6c0f8f22170a6bd03bd6940b28c3ec09b8e7f6
airport-codes.csv d3f5fc8cef4329f63280f4958547872c58c4af18320a004d1489863c1f395008
Expand Down