Creating external links via TimeSeries(data=timeseries,...)
broken
#1767
Labels
category: bug
errors in the code or code behavior
priority: low
alternative solution already working and/or relevant to only specific user(s)
Creating external links with the logic of setting
TimeSeries(data=timeseries,...)
andTimeSeries(timestamps=timeseries, ...)
appears to be broken. Creating an external link withHDF5IO
works:pynwb/tests/integration/hdf5/test_modular_storage.py
Lines 82 to 84 in 68c4f56
But using the approach with
TimeSeries(data=timeseries, ...)
pynwb/tests/integration/hdf5/test_modular_storage.py
Line 81 in 68c4f56
results in a broken external link:
Originally posted by @oruebel in #1766 (comment)
How to test
#1766 adds
TestTimeSeriesModularLinkViaTimeSeries
to test this issue. This test is currently being skipped. Re-enabling the test will trigger the issue.Further details
Looking at the generated file with the links, it appears that the path to the external file being set correctly but the path to the object is not being set correctly when using the
TimeSeries(data=timeseries,...)
approach:I.e. it should be
External Link {test_time_series_modular_data.nwb//acquisition/data_ts/data}
instead. The issue appears to be in how the path within the file is being determined. I'm not sure yet what the fix for this issue is, but I think it is likely either part ofTimeSeriesMap.data_attr
andTimeSeriesMap.timestamps_attr
or a bug inHDF5IO.write_link
Workaround
As a workaround we can use
H5DataIO
to explicitly link to the external file:or alternatively, when using
NWBHDF5IO.write(..., link_data=True)
(which is the default), we can omit wrapping withH5DataIO
and simply set the timestamps to theh5py.Dataset
:The text was updated successfully, but these errors were encountered: