matnwb icon indicating copy to clipboard operation
matnwb copied to clipboard

[Bug]: Error when validating (dandi validate) file created with matnwb

Open dustinf1989 opened this issue 1 year ago • 10 comments
trafficstars

What happened?

I created .nwb files using MATLAB but get this error when I try to validate: D:\emotional_memory_neuronal_analyses\emotional_memory_neuronal_dandi\000887>dandi validate

[pywnb.GENERIC] D:\emotional_memory_neuronal_analyses\emotional_memory_neuronal_dandi\000887\sub-001\sub-001_ses-ENC_behavior+ecephys.nwb — DtypeError.init: incorrect type for 'expected' (got 'RefSpec', expected 'dtype, type, str or list')

What is field the incorrect type?

I ran nwbinspector on the same file and copied the error message to this txt file: error_message.txt

Can you help me figure this out please?

Thanks!

Steps to Reproduce

I ran nwbinspector on the same file and copied the error message to this txt file:
[error_message.txt](https://github.com/NeurodataWithoutBorders/matnwb/files/14192478/error_message.txt)

Error Message

No response

Operating System

Windows

Matlab Version

R2022b

Code of Conduct

dustinf1989 avatar Feb 07 '24 10:02 dustinf1989

Hi @dustinf1989 , Is it possible for you to provide the source file so we can take a look? If not, we would want a minimal example that recreates this issue with the inspector.

lawrence-mbf avatar Feb 07 '24 15:02 lawrence-mbf

Hi @lawrence-mbf thank you for the quick response. Sure, I can share the file. You should be able to download it here: https://drive.google.com/file/d/1qkzeef1o8dnvgSvsIQZvwRrijuSEBd5w/view?usp=sharing

dustinf1989 avatar Feb 07 '24 16:02 dustinf1989

Hi @dustinf1989 ,

It looks like the error has something to do with electrode_group in the file; But as far as I can tell, there does not appear to be anything wrong with the type.

@rly @bendichter any thoughts about this?

lawrence-mbf avatar Feb 07 '24 21:02 lawrence-mbf

Hi @lawrence-mbf

Thanks for checking this out. I edited the size of the 'electrode_group' variable so it is the same size as the 'spike_times' variable but I still get the same error.

Could it be related to the dimensions of waveforms'? The dimensions are [143756×64 single]

The new file is uploaded here: https://drive.google.com/file/d/1n60v9kG25oxMP3Waz1AeTmk3o9UUwhiM/view?usp=drive_link

dustinf1989 avatar Feb 08 '24 11:02 dustinf1989

I was browsing around, could it be related to this issue in PyNWB? https://github.com/NeurodataWithoutBorders/pynwb/issues/1692

ehennestad avatar Feb 08 '24 13:02 ehennestad

I can use this Python code to load the file and create a few basic plots, so the file seems to work, but I still get the same error when trying to validate. Any ideas on how to get around this error?

load_nwb_files.txt

dustinf1989 avatar Feb 12 '24 15:02 dustinf1989