IPFX - IntracellularElectrode error

Hi,

I am trying to work with the patch-seq data from the Gouwens et al. 2020 Cell paper using the IPFX (environment: ipfx v 1.0.8, Python 3.7.16) run_feature_vector_extraction function. However, the script keeps failing to run past create_ephys_data_set and returns the following error.

example code:

from ipfx.dataset.create import create_ephys_data_set

dataset = create_ephys_data_set(nwb_file="/path/to/nwbfile/sub-1001658946_ses-1003020741_icephys.nwb")

And the error message:

ConstructError: (root/general/intracellular_ephys/electrode_0 GroupBuilder {'attributes': {'namespace': 'core', 'neurodata_type': 'IntracellularElectrode', 'object_id': '4aeb48a7-3cdb-4979-94e0-02152c8660cb'}, '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': '2202c004-2a3b-4695-909c-2e0a9f6d6738'}, 'groups': {}, 'datasets': {}, 'links': {}}}}}, "Could not construct IntracellularElectrode object due to: IntracellularElectrode.__init__: incorrect type for 'description' (got 'bytes', expected 'str')")

Interestingly when I run the same code on some other patch-clamp data (from the Scala 2021 study), the code runs through without any problems. I’m new to working with nwb/ephys data so I’m not really sure how to deal with this error message.

any help would be appreciated!

best wishes,

Salomé

I am able to load that NWB file without an error on my machine with IPFX v.1.0.8. I wonder if it’s a difference in the versions of some of its dependencies. What versions of pynwb and hdmf do you have installed?

Hi, thanks for the fast reply!
I have pynwb 1.5.0 and hdmf 2.5.5.

That might be related to it, then - on my machine, I have newer versions of those packages: pynwb 2.2.0 and hdmf 3.11.0. You could try upgrading them and seeing if that fixes the error.

Yep that seemed to be the cause - upgraded both and everything runs through now. Thanks a lot!

1 Like