-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PrePARE UnicodeDecodeError when scanning dummy NO_ATTRIBUTES.nc netCDF file #643
Comments
Hi @atmodatcode, the file you are working with looks to be a long way from what we would expect to be passed in. If you give the file a name that has some of the information expected, even just The code itself could probably handle this if the two |
I have discovered that there was an error message being generated using a string that wasn't initialized since the Lines 1035 to 1038 in df7fc34
I have added some code to check if the attribute exists before proceeding to code that requires the attribute's value. I will create a pull request to merge it. |
I wonder if there are similar cases to this, since the original coder may not have anticipated handling such an egregiously out-of-conformance file. I realize this only occurred because experiment_id was missing, so maybe there are no other instances of imbedded dependencies like this. |
@taylor13 agreed, it would be great if we could catch such an error and stop - at the very least what @matthew-mizielinski suggests and what @mauzey1 has implemented is a step in the right direction |
Hello,
when exploring how the PrePARE checker is working, I tried it out on various files.
While it works perfectly on a ps_3hr_MPI-ESM1-2-HR_historical_r6i1p1f1_gn_201007120000-201007122100.nc file, there is a strange UnicodeDecodeError when using it for scanning the dummy netcdf file https://raw.githubusercontent.com/AtMoDat/demo_data/main/NO_ATTRIBUTES.nc.
The dummy file is a netCDF file with no metadata, but otherwise a valid netCDF file.
E.g. output when scanning with the latest CEDA CF Checker
Thanks and best regards
The text was updated successfully, but these errors were encountered: