HDF5-DIAG: Error detected in HDF5


Dear expert,
I am trying to use the function dataset from the package netcdf4. I always get the following error:

HDF5-DIAG: Error detected in HDF5 (1.10.4) thread 140353498163008:
#000: H5F.c line 444 in H5Fcreate(): unable to create file
major: File accessibilty
minor: Unable to open file
#001: H5Fint.c line 1364 in H5F__create(): unable to open file
major: File accessibilty
minor: Unable to open file
#002: H5Fint.c line 1559 in H5F_open(): unable to open file: name = ‘./home/kermarrec/palm_model_system/packages/virtual_measurements/palm_cvd/my_vm_driver’, tent_flags = 13
major: File accessibilty
minor: Unable to open file
#003: H5FD.c line 734 in H5FD_open(): open failed
major: Virtual File Layer
minor: Unable to initialize object
#004: H5FDsec2.c line 346 in H5FD_sec2_open(): unable to open file: name = ‘./home/kermarrec/palm_model_system/packages/virtual_measurements/palm_cvd/my_vm_driver’, errno = 2, error message = ‘No such file or directory’, flags = 13, o_flags = 242
major: File accessibilty
minor: Unable to open file
Traceback (most recent call last):
File “palm_cvd”, line 402, in
ncfile_out = Dataset( output_filename, “w”,format=“NETCDF4” )
File “netCDF4/_netCDF4.pyx”, line 2321, in netCDF4._netCDF4.Dataset.init
File “netCDF4/_netCDF4.pyx”, line 1885, in netCDF4._netCDF4._ensure_nc_success
PermissionError: [Errno 13] Permission denied: b’./home/kermarrec/palm_model_system/packages/virtual_measurements/palm_cvd/my_vm_driver’

I checked all permissions and everything was fine. My collegue does not have this issue on his computer and we do not have any idea how to fix it. Thanks for your help!


Why do you have a dot (.) in front of /home/kermarrec? On every system that I work on, this would cause file not found, unless you have a subdirectory or sym link named “home”. That seems unlikely.


thanks for your answer, actually with or without dot, I got the same error, unfortunately. I tried all kind of combinations, the file is just not created at all. If you have any idea why, please let me know. thanks! best gael.


Okay. The messages mean simply that your program tried to create a new regular file with the file name as shown, and the create operation failed. Possible reasons include wrong permissions, invalid file name, errors in the path, unexpected character encoding in specified path or in one of the directory names on disk, and previous file existing with the same name (overwrite protect).

Here is a simple first test. Try to create a dummy file using a generic system method such as “date > path/filename”. Use the exact path and filename that is in your program.

If that does not find the problem, then get the simplest stand-alone file create test program in the C language. The HDF5 website has a section with many short sample programs. Compile and run that against your current HDF5 version. If necessary, do the same with your current Python version.


I forgot to mention, “missing directory” is one of the possible causes.


You could also try a short Netcdf-4 test program in C language. Do this before any Python test. There are examples on the Netcdf website. Same as before, ensure you are testing with exactly the same library versions that are used by your Python module.


many thanks for your help, I will try and let you know if it works. gael.