I have created a hdf5
file using file = open()
command. In this case, I can write and read the file. But it is giving me attribute error when I am trying file.keys()
. The error is AttributeError: 'file' object has no attribute 'keys'
.
Then I have created a new hdf5
file using file = h5py.File()
command. In this case, I can read and use command file.keys()
without any error. But I can not write in the file. The error is AttributeError: 'File' object has no attribute 'write'
.
What are the reasons behind these error? Is there any difference between 'file'
object and 'File'
object?