BouchardLab / nsds_lab_to_nwb

Python package to convert NSDS Lab data to NWB files.
https://nsds-lab-to-nwb.readthedocs.io/en/latest/
0 stars 4 forks source link

Invalid type for nwb scratch #109

Closed jthermiz closed 3 years ago

jthermiz commented 3 years ago

Current version throws an error because of this line of code in nwb_builder.py line 184. key=is_clean_block has an invalid value=True

nwb_content.add_scratch(data=value,
                                    name=key, notes=f'extra metadata {key}')
Exception has occurred: TypeError
NWBFile.add_scratch: incorrect type for 'data' (got 'bool', expected 'ndarray, list, tuple, DataFrame, DynamicTable, NWBContainer or ScratchData')
  File "/home/jhermiz/software/nsds_lab_to_nwb/nsds_lab_to_nwb/nwb_builder.py", line 184, in _add_extra_metadata
    name=key, notes=f'extra metadata {key}')
  File "/home/jhermiz/software/nsds_lab_to_nwb/nsds_lab_to_nwb/nwb_builder.py", line 232, in build
    self._add_extra_metadata(nwb_content)
  File "/home/jhermiz/software/nsds_lab_to_nwb/scripts/generate_nwb_john.py", line 59, in <module>
    nwb_content = nwb_builder.build()