matnwb icon indicating copy to clipboard operation
matnwb copied to clipboard

[Bug]: Issue with schema not being compatible with OpenScope namespace/yaml

Open Ahad-Allen opened this issue 2 years ago • 3 comments
trafficstars

What happened?

One of our OpenScope project packaged in 2022 is about to be published. We packaged the data in NWB files on Dandi but our collaborators found some issues loading the files in MatNWB, while it worked on our end with PyNWB.

We discussed this issue over email with Vijay and he suggested that we create an issue on this repo for documentation purposes

Steps to Reproduce

The files are currently embargoed(we can share them with the team privately if needed), but trying to open them using matnwb returns an error.

Error Message

Error using types.util.checkUnset (line 13)
Unexpected properties {data_offset}.

Your schema version may be incompatible with the file.
Consider checking the schema version of the file with
`util.getSchemaVersion(filename)` and comparing with the YAML
namespace version present in nwb-schema/core/nwb.namespace.yaml

Error in types.core.IndexSeries (line 35)
            types.util.checkUnset(obj,
            unique(varargin(1:2:end)));

Error in io.parseGroup (line 85)
    parsed = eval([Type.typename '(kwargs{:})']);

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 io.parseGroup (line 38)
    subg = io.parseGroup(filename, group, Blacklist);

Error in nwbRead (line 59)
nwb = io.parseGroup(filename, h5info(filename), Blacklist);

Operating System

Windows

Matlab Version

2.4.0

Code of Conduct

Ahad-Allen avatar Sep 26 '23 17:09 Ahad-Allen

Can you post what util.getSchemaVersion(filename) returns?

lawrence-mbf avatar Sep 26 '23 18:09 lawrence-mbf

Sorry for the delay, I had to reach out to the external team to get that validated. Seems like they are getting a return of 2.6.0 from that.

Ahad-Allen avatar Oct 03 '23 15:10 Ahad-Allen

2.6.0 should have a data_offset property for IndexSeries and I can confirm that it exists. It is possible that this is just a MATLAB Path resolution problem. Can you call which types.core.IndexSeries and confirm for me that the generated files are where you expect them to be? Usually what happens is that MATLAB prefers resolving path names from PATH before checking the working directory.

lawrence-mbf avatar Oct 03 '23 15:10 lawrence-mbf