Skip to content
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

HDF5 RuntimeError on second+ level Section copy #527

Open
mpsonntag opened this issue Aug 31, 2021 · 0 comments
Open

HDF5 RuntimeError on second+ level Section copy #527

mpsonntag opened this issue Aug 31, 2021 · 0 comments

Comments

@mpsonntag
Copy link
Contributor

Sections provide the copy_section() method (which is awesome by the way), that allows to copy whole section trees within a file or from one file to another.

Currently this only works with sections or section trees, that reside directly at the root of the file:

File
└ Section <- copy_section works

Sections that are at least one level deeper lead to an error
(h5py/h5o.pyx in h5py.h5o.copy(): RuntimeError: Unable to copy object (component not found))
in the HDF5 library and cannot be copied.

File
└ Section
   └ Section  <- copy_section borks

Examples:

fname = "ishallruetheday.nix"
f = nixio.File.open(fname, nixio.FileMode.Overwrite)
sec = f.create_section("to.be.copied", "test")
sec.create_section("I.shant.be.copied", "test")
receive_sec = f.create_section("copy.receiver", "test")

# first level copy works
receive_sec.copy_section(f.sections["to.be.copied"])
# second level copy borks
receive_sec.copy_section(f.sections["to.be.copied"].sections["I.shant.be.copied"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant