HDFGroup / h5pyd

h5py distributed - Python client library for HDF Rest API
Other
114 stars 38 forks source link

create_group clears file #8

Closed ahalota closed 8 years ago

ahalota commented 8 years ago

I ran the following code on my file. The new group gets added, however all of the old data in the file disappears. The file size is now 8kb from previous 50mb, so it definitely got wiped.

fileOut = h5py.File("My_File.hdfgroup.org","w")
fileOut.create_group('2015')

This is a file that previously had ACL authentication, which I removed. Before removing it I got an IOError and no changes were made to the file.

jreadey commented 8 years ago

Yes, that's expected. :)

In h5py as well, using the 'w' mode deletes any existing content in the file. You'll want to use 'a'.

jreadey commented 8 years ago

Closing this as it is not a problem with the package.