HDF5 RuntimeError on second+ level Section copy
- Dominant language
- Python
- Stars
- 22
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
`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"])
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with the provided Sections and copy_section() example, focusing on the nested-section call that triggers h5py.h5o.copy()'s component-not-found RuntimeError. Trace the implementation of Sections.copy_section() and verify that copying a second-level section completes without an exception while preserving the section tree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100