AllenNeuralDynamics / AllenNeuralDynamics/aind-ecephys-nwb

mmap length greater than file size

Đang mở
#14 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
0
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Working with a 2 segment openephys recording i end up with the following `ValueError`:
```
Command error:
File "/opt/conda/lib/python3.11/site-packages/hdmf/utils.py", line 668, in func_call
return func(args[0], **pargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/hdmf_zarr/backend.py", line 541, in write_group
self.write_dataset(
File "/opt/conda/lib/python3.11/site-packages/hdmf/utils.py", line 668, in func_call
return func(args[0], **pargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/hdmf_zarr/backend.py", line 1132, in write_dataset
self.__dci_queue.exhaust_queue()
File "/opt/conda/lib/python3.11/site-packages/hdmf_zarr/utils.py", line 217, in exhaust_queue
if self.__write_chunk__(zarr_dataset, iterator):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/hdmf_zarr/utils.py", line 77, in __write_chunk__
chunk_i = next(data)
^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/hdmf/data_utils.py", line 405, in __next__
return DataChunk(data=self._get_data(selection=buffer_selection), selection=buffer_selection)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/neuroconv/tools/spikeinterface/spikeinterfacerecordingdatachunkiterator.py", line 96, in _get_data
return self.recording.get_traces(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/spikeinterface/core/baserecording.py", line 340, in get_traces
traces = rs.get_traces(start_frame=start_frame, end_frame=end_frame, channel_indices=channel_indices)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/spikeinterface/preprocessing/filter.py", line 162, in get_traces
traces_chunk, left_margin, right_margin = get_chunk_with_margin(
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/spikeinterface/core/recording_tools.py", line 863, in get_chunk_with_margin
traces_chunk = rec_segment.get_traces(
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/spikeinterface/preprocessing/decimate.py", line 130, in get_traces
return self._parent_segment.get_traces(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/spikeinterface/core/channelslice.py", line 101, in get_traces
traces = self._parent_recording_segment.get_traces(start_frame, end_frame, parent_indices)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/spikeinterface/extractors/neoextractors/neobaseextractor.py", line 367, in get_traces
raw_traces = self.neo_reader.get_analogsignal_chunk(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/neo/rawio/baserawio.py", line 1006, in get_analogsignal_chunk
raw_chunk = self._get_analogsignal_chunk(block_index, seg_index, i_start, i_stop, stream_index, channel_indexes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/neo/rawio/baserawio.py", line 1621, in _get_analogsignal_chunk
raw_sigs = get_memmap_chunk_from_opened_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/neo/rawio/utils.py", line 46, in get_memmap_chunk_from_opened_file
memmap_obj = mmap.mmap(fid.fileno(), length=length, access=mmap.ACCESS_READ, offset=memmap_offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: mmap length is greater than file size
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.