nmc_met_io icon indicating copy to clipboard operation
nmc_met_io copied to clipboard

read_micaps_4读取数据出错

Open liucouhua opened this issue 7 years ago • 1 comments

while i was reading a m4 file with the function, there was an error report: File "S:\ProgramData\Anaconda3\lib\site-packages\nmc_met_io\read_micaps.py", line 148, in read_micaps_4 txt = f.read().decode('GBK').replace('\n', ' ').split() AttributeError: 'str' object has no attribute 'decode'

I tried for another file but there was still the error. The file I read was "r"Z:\data\newecmwf_grib\rain24\rain02\19032820.024"

liucouhua avatar Mar 29 '19 01:03 liucouhua

由于读入文件时,不同的文件解码有问题,出现改错误。采用多种解码方式循环尝试,解决了该问题。

NMC-DAVE avatar Mar 03 '20 15:03 NMC-DAVE