nmc_met_io
nmc_met_io copied to clipboard
read_micaps_4读取数据出错
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"
由于读入文件时,不同的文件解码有问题,出现改错误。采用多种解码方式循环尝试,解决了该问题。