Open dervinism opened 2 years ago
Hi @dervinism , please add the argument load_namespaces=True
when opening the file and let me know if that works:
io = NWBHDF5IO('F:/infraslow-dynamics/03_data/003_allen_raw_derived/M766640955/session_766640955.nwb', mode="r", load_namespaces=True)
nwbfile = io.read()
I think you can also use the allensdk to open the NWB file instead of pynwb: https://allensdk.readthedocs.io/en/latest/visual_coding_neuropixels.html
Adding load_namespaces=True
worked. However, I cannot load the same file in Matlab. Running the code line below
nwb2 = nwbRead('F:\infraslow-dynamics\03_data\003_allen_raw_derived\M766640955\session_766640955.nwb');
gives the following error:
Error using types.util.correctType (line 11)
Value of type `cell` could not be coerced into a logical value.
Error in types.util.checkDtype (line 111)
val = types.util.correctType(val, type);
Error in types.ndx_aibs_ecephys.EcephysElectrodeGroup/validate_has_lfp_data (line
64)
val = types.util.checkDtype('has_lfp_data', 'logical', val);
Error in types.ndx_aibs_ecephys.EcephysElectrodeGroup/set.has_lfp_data (line 35)
obj.has_lfp_data = obj.validate_has_lfp_data(val);
Error in types.ndx_aibs_ecephys.EcephysElectrodeGroup (line 26)
obj.has_lfp_data = p.Results.has_lfp_data;
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);
Shouldn't NWB files be readabe both in Python and Matlab?
That may be a bug in matnwb. Can you post an issue ticket there?
Describe the bug I get the following error when I try to read NWB files (Visual Coding Neuropixels experiment) after loading them with NWBHDF5IO function of pynwb package:
To Reproduce Install pynwb in a separate conda environment and execute the script below on vscode
Expected behavior Expected not to get this error. There is no problem loading these files in HDFView.
Actual Behavior Error
Environment (please complete the following information):
Additional context None
Do you want to work on this issue? No