Reading zero length netCDF or PP files causes cf-python to hang
touch dodgy.nc ipython import cf f = cf.read('dodgy.nc') or f=cf.read('dodgy.nc', ignore_read_error=True)
The prompt doesn't return and no error is output.
cf.environment(paths=False) Platform: Linux-5.4.0-121-generic-x86_64-with-glibc2.31 HDF5 library: 1.12.1 netcdf library: 4.8.1 udunits2 library: /home/andy/cfview_distrib/3.9/miniconda3/lib/libudunits2.so.0 Python: 3.9.12 netCDF4: 1.6.0 cftime: 1.6.0 numpy: 1.23.0 psutil: 5.9.1 scipy: 1.8.1 matplotlib: 3.5.2 ESMF: not available cfdm: 1.9.0.3 cfunits: 3.3.4 cfplot: 3.1.22 cf: 3.13.0
Thanks for the details, Andy. We'll get this addressed shortly.
This will be fixed by upgrading to cfdm 1.9.0.4, which will be released shortly. See https://github.com/NCAS-CMS/cfdm/issues/190 for details.