-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Hi all,
I ran into an issue when reading NWB files with MatNWB that was generated with extensions using DynamicTableRegion. MatNWB throws the following error:
Error using feval
Unrecognized function or variable 'types.hdmf_experimental.DynamicTableRegion'.
Error in io.createParsedType (line 28)
typeInstance = feval(typeName, varargin{:});
Error in io.parseDataset (line 86)
parsed = io.createParsedType(fullpath, Type.typename, kwargs{:});
Error in io.parseGroup (line 22)
dataset = io.parseDataset(filename, datasetInfo, fullPath, Blacklist);
Error in io.parseGroup (line 38)
subg = io.parseGroup(filename, group, Blacklist);
Error in io.parseGroup (line 38)
subg = io.parseGroup(filename, group, Blacklist);
Error in nwbRead (line 99)
nwb = io.parseGroup(filename, h5info(filename), blackList);
Error in <script> (line 17)
nwbfile = nwbRead(nwbfile_path);
After debugging with @ehennestad, we found that the problem is that the namespace for DynamicTableRegion inside the file is set to hdmf_experimental instead of hdmf_common in /acquisition/electrical_series/electrodes.
This is a snippet from an NWB file generated with ndx-fscv:
This is another NWB file generated with ndx-anatomical-location:
I also managed to replicate this with ndx-fiber-photometry. In all cases, the written file incorrectly assigns the namespace hdmf_experimental to DynamicTableRegion.
PyNWB reads the file without any problems, however, MatNWB fails to resolve types.hdmf_experimental.DynamicTableRegion, which triggers the error.
Eivind is attempting to reproduce this on his side as well.
I'm not sure if this needs to be fixed in MatNWB or hdmf side so I'm opening this here for now and see what you think.