-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
import pynwb
import lindi
import numpy as np
h5_url = "https://api.dandiarchive.org/api/assets/11f512ba-5bcf-4230-a8cb-dc8d36db38cb/download/"
f = lindi.LindiH5pyFile.from_hdf5_file(h5_url)
io = pynwb.NWBHDF5IO(file=f, mode="r")
nwbfile = io.read()
nwbfile.processing["ecephys"]["LFP"]["LFP"].data # <LindiH5pyDataset: /processing/ecephys/LFP/LFP/data>
np.array(nwbfile.processing["ecephys"]["LFP"]["LFP"].data)
# Output:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/Users/rly/miniconda3/envs/test7/lib/python3.12/site-packages/h5py/_hl/dataset.py", line 1112, in __array__
self.read_direct(arr)
File "/Users/rly/miniconda3/envs/test7/lib/python3.12/site-packages/h5py/_hl/dataset.py", line 1054, in read_direct
if self._is_empty:
^^^^^^^^^^^^^^
File "/Users/rly/miniconda3/envs/test7/lib/python3.12/site-packages/h5py/_hl/base.py", line 532, in __get__
value = obj.__dict__[self.func.__name__] = self.func(obj)
^^^^^^^^^^^^^^
File "/Users/rly/miniconda3/envs/test7/lib/python3.12/site-packages/h5py/_hl/dataset.py", line 666, in _is_empty
return self._extent_type == h5s.NULL
^^^^^^^^^^^^^^^^^
File "/Users/rly/miniconda3/envs/test7/lib/python3.12/site-packages/h5py/_hl/base.py", line 532, in __get__
value = obj.__dict__[self.func.__name__] = self.func(obj)
^^^^^^^^^^^^^^
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/Users/rly/miniconda3/envs/test7/lib/python3.12/site-packages/h5py/_hl/dataset.py", line 661, in _extent_type
return self.id.get_space().get_simple_extent_type()
^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get_space'
Metadata
Metadata
Assignees
Labels
No labels