HDMF manages the building of groups and datasets, using the hdf5 object's id: https://github.com/hdmf-dev/hdmf/blob/244d17a28ed436849b1973a3aaac8522d0ea922b/src/hdmf/backends/hdf5/h5tools.py#L568
If the group or dataset has been read into a builder, it is cached using the hdf5 file name (path) and the hdf5 object's id. For some reason, the id being stored in the cache is different than the id of the reference in the nwbfile.electrodes.group dataset, so the referenced built electrode group object cannot be found.
(warning: the HDMF code around resolving datasets of references is a jumble of abstraction -- I can help debug next week when I have some time)
It looks like datasets of references are not being resolved on read correctly. When I run
examples/exam.py
, and add:On the second
print
, I get the error:ValueError: :/general/extracellular_ephys/shank0 has not been built
The RFS JSON looks correct:
HDMF manages the building of groups and datasets, using the hdf5 object's
id
: https://github.com/hdmf-dev/hdmf/blob/244d17a28ed436849b1973a3aaac8522d0ea922b/src/hdmf/backends/hdf5/h5tools.py#L568 If the group or dataset has been read into a builder, it is cached using the hdf5 file name (path) and the hdf5 object'sid
. For some reason, theid
being stored in the cache is different than the id of the reference in thenwbfile.electrodes.group
dataset, so the referenced built electrode group object cannot be found.(warning: the HDMF code around resolving datasets of references is a jumble of abstraction -- I can help debug next week when I have some time)