AllenInstitute/ipfx

Fail using the create_ephys_data_set to open nwb file in the patch-seq ephys dataset.

Opened this issue · 3 comments

nwb_path 000020/sub-604669385/sub-604669385_ses-606271245_icephys.nwb
data_set = create_ephys_data_set(nwb_file=nwb_path)
-> 1248 raise ConstructError(builder, msg) from ex
1249 return obj
1250

ConstructError: (root/general/intracellular_ephys/electrode_0 GroupBuilder {'attributes': {'namespace': 'core', 'neurodata_type': 'IntracellularElectrode', 'object_id': '5060b762-d5b2-4bc0-bdd6-08172f89afed'}, 'groups': {}, 'datasets': {'description': root/general/intracellular_ephys/electrode_0/description DatasetBuilder {'attributes': {}, 'data': b'Headstage 0'}}, 'links': {'device': root/general/intracellular_ephys/electrode_0/device LinkBuilder {'builder': root/general/devices/device_ITC18USB_Dev_0 GroupBuilder {'attributes': {'description': 'Harvard Bioscience (formerly HEKA/Instrutech) Model: ITC18USB', 'namespace': 'core', 'neurodata_type': 'Device', 'object_id': 'acdfa2c8-daa8-44ef-a0b6-1631a6d93fcd'}, 'groups': {}, 'datasets': {}, 'links': {}}}}}, "Could not construct IntracellularElectrode object due to: IntracellularElectrode.init: incorrect type for 'description' (got 'bytes', expected 'str')")

t-b commented

Which pynwb version are you using?

@t-b Thanks for your reply. My version of pynwb is 1.5.1

t-b commented

My version of pynwb is 1.5.1.

That is a version which should work. Are you sure you are using the recommended hdmf/h5py versions for this particular pynwb version? This old pynwb version requires h5py < 3.0, see https://github.com/hdmf-dev/hdmf/blob/dev/CHANGELOG.md#hdmf-300-july-6-2021.

The easiest thing is probably to use the latest pynwb version (2.3.2, see https://github.com/NeurodataWithoutBorders/pynwb/releases/tag/2.3.2).