-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Describe the bug
cdms 3.1.5 fails with a UnicodeDecodeError when attempting to open an NCO-generated netcdf file
To Reproduce
Steps to reproduce the behavior:
In [2]: import cdms2 as cdm
In [3]: f = '/p/css03/esgf_publish/CMIP6/CMIP/CNRM-CERFACS/CNRM-CM6-1/abrupt-4xCO2/r3i1p1f2/Eday/rivo/gn/v20181012/rivo_Eday_CNRM-CM6-1_abrupt-4xCO2_r3i1p1f2_gn_18500501-18591231.nc'
In [4]: fH = cdm.open(f)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 11: invalid start byte
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/tmp/ipykernel_70886/1508437202.py", line 1, in <module>
fH = cdm.open(f)
File "/home/durack1/anaconda3/envs/cdms315spy515cart020/lib/python3.9/site-packages/cdms2/dataset.py", line 523, in openDataset
file = CdmsFile(path, mode, hostObj)
File "/home/durack1/anaconda3/envs/cdms315spy515cart020/lib/python3.9/site-packages/cdms2/dataset.py", line 1295, in __init__
self._file_ = Cdunif.CdunifFile(path, mode)
SystemError: <built-in function CdunifFile> returned a result with an error setExpected behavior
I would have expected cdms could open the file, ncdump -h works fine
Screenshots or traceback
reproducible steps above should provide enough info
Desktop (please complete the following information):
- OS: RHEL 7.9
Metadata
Metadata
Assignees
Labels
No labels