When an NWB file is exported from MatNWB, pyNWB will read its experimenter information as bytes instead of string, causing nwbwidgets error: TypeError: sequence item 0: expected str instance, bytes found.
So, in detail, if I define an NWB in matNWB
(...'general_experimenter', 'input later'...)
or
(...'general_experimenter', {'input later'}...)
And reads it in pyNWB, print nwb.experimenter, it will show: (b'input later',)
Consequently if I run nwb2widget(nwb), I get an error message: TypeError: sequence item 0: expected str instance, bytes found
For a sample data that works in nwbwidgets, if I read it in matNWB, and run disp(nwb.general_experimenter), it will show
DataStub with properties:
filename: '/Users/bichanwu/Desktop/nwb workshop/Steinmetz2019_Cori_2016-12-14.nwb'
path: '/general/experimenter'
dims: 1
For a matNWB defined nwb file, it'll show just string or cell. After exporting and reading, it becomes a dataStub as well, but pynwb still reads it as bytes.
When an NWB file is exported from MatNWB, pyNWB will read its experimenter information as bytes instead of string, causing nwbwidgets error:
TypeError: sequence item 0: expected str instance, bytes found
.So, in detail, if I define an NWB in matNWB
(...'general_experimenter', 'input later'...)
or(...'general_experimenter', {'input later'}...)
And reads it in pyNWB, print
nwb.experimenter
, it will show:(b'input later',)
Consequently if I run
nwb2widget(nwb)
, I get an error message:TypeError: sequence item 0: expected str instance, bytes found
For a sample data that works in nwbwidgets, if I read it in matNWB, and run
disp(nwb.general_experimenter)
, it will showFor a matNWB defined nwb file, it'll show just string or cell. After exporting and reading, it becomes a dataStub as well, but pynwb still reads it as bytes.