Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: read error #671

Open
2 tasks done
bendichter opened this issue Feb 17, 2025 · 1 comment
Open
2 tasks done

[Bug]: read error #671

bendichter opened this issue Feb 17, 2025 · 1 comment

Comments

@bendichter
Copy link
Contributor

bendichter commented Feb 17, 2025

What happened?

Error trying to read

Image

https://api.dandiarchive.org/api/assets/0f57f0b0-f021-42bb-8eaa-56cd482e2a29/download/

Steps to Reproduce

This does not work:

>> !git clone https://github.com/NeurodataWithoutBorders/matnwb.git
>> addpath(genpath('matnwb'));
>> nwb = nwbRead('/Users/bendichter/Downloads/sub-P11HMH_ses-20061101_ecephys+image (2).nwb')

But this does work:

nwb = nwbRead('/Users/bendichter/Downloads/sub-P11HMH_ses-20061101_ecephys+image (2).nwb', 'ignorecache')

Error Message

The class 'types.core.DynamicTable' is not a
superclass of class 'types.core.TimeIntervals', as
required to invoke a superclass constructor or
method.

Error in types.core.TimeIntervals (line 56)
        obj = [email protected](varargin{:});
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in io.createParsedType (line 28)
    typeInstance = feval(typeName, varargin{:}); % Create the type.
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in io.parseGroup (line 78)
    parsed = io.createParsedType(info.Name, 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 nwbRead (line 97)
    nwb = io.parseGroup(filename, h5info(filename), blackList);
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Operating System

macOS

Matlab Version

2024b

Code of Conduct

@ehennestad
Copy link
Collaborator

I feel like this is a MATLAB bug related to how the path is updated.

I tried your example code and I got the same error as you. Then I restarted MATLAB and the code worked. I occasionally get similar errors when juggling branches and nwb schema versions, and it usually works to restart MATLAB. restoredefaultpath, clear all, clear classes, rehash does not work in these situations. Curious to hear what happens if you restart MATLAB and run the code again.

Also, the following consistently does not work:

>> !git clone https://github.com/NeurodataWithoutBorders/matnwb.git
>> addpath(genpath('matnwb'));
>> nwb = nwbRead('/Users/bendichter/Downloads/sub-P11HMH_ses-20061101_ecephys+image (2).nwb', 'ignorecache')
Error using types.core.VectorData
One or more superclasses of class 'types.core.VectorData' have changed, requiring an update to class
'types.core.VectorData'.  MATLAB is unable to update class 'types.core.VectorData' because it is not on the path.  To
access instances of this class, add it to the path.

Error in io.createParsedType (line 28)
    typeInstance = feval(typeName, varargin{:}); % Create the type.

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

Error in nwbRead (line 97)
    nwb = io.parseGroup(filename, h5info(filename), blackList);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants