Traceback (most recent call last):
File "./cmor-fixer.py", line 255, in process_file
modified = fix_file(path, write, keepid, forceid, metadata, add_attributes)
File "./cmor-fixer.py", line 78, in fix_file
ds = netCDF4.Dataset(path, "r+" if write else "r")
File "netCDF4/_netCDF4.pyx", line 2321, in netCDF4._netCDF4.Dataset.__init__
File "netCDF4/_netCDF4.pyx", line 1885, in netCDF4._netCDF4._ensure_nc_success
OSError: [Errno -101] NetCDF: HDF error: b'test-data/ORCA025-grid-files-test-1/tos_Omon_EC-Earth3P-HR_hist-1950_r1i1p2f1_gn_200601-200612.nc'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./cmor-fixer.py", line 369, in <module>
main()
File "./cmor-fixer.py", line 342, in main
worker(fullpath)
File "./cmor-fixer.py", line 262, in process_file
log.error("An IO error for file %s occurred: %s" % (path, io_err.message))
AttributeError: 'OSError' object has no attribute 'message'
There is a failure case for
cmor-fixerwhich might be hard to debug:If
cmor-fixertries to fix a file which is opened and assessed by another program it fails. A known case is that a file is opened byncview.If you try to fix a netcdf file withcmor-fixerwhile you have it open withncview,cmor-fixerwill fail.The error might look like this: