Failed to extract metadata: Indexing elements must be in increasing order
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
Hướng nghiên cứu
Bắt đầu trong dandi/pynwb_utils.py tại _get_session_duration(), đặc biệt là dòng được chỉ ra trong traceback, và tái hiện lỗi với tệp NWB được nêu bằng dandi upload. So sánh dữ liệu thời gian phiên của tệp này với dữ liệu của hai tệp tải lên thành công. Hoàn tất khi việc trích xuất siêu dữ liệu và tải lên không còn thất bại đối với tệp này, đồng thời có coverage cho trường hợp được báo cáo nếu xác định được vị trí test hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello,
I've made some nwb files and am trying to upload them to DANDI using dandi upload. I have three of them. Two upload just fine. The other one hits this error trace:
2026-05-28T16:06:11+0100 [WARNING ] dandi 923713:127939540670144 Failed to extract NWB metadata from /home/nolanlab/fromgit/nolanlab_nwb/001854/sub-M22/sub-M22_ses-D34OF2_ecephys+behavior.nwb: TypeError: Indexing elements must be in increasing order
2026-05-28T16:06:11+0100 [ERROR ] dandi 923713:127939540670144 Error uploading /home/nolanlab/fromgit/nolanlab_nwb/001854/sub-M22/sub-M22_ses-D34OF2_ecephys+behavior.nwb:
Traceback (most recent call last):
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/upload.py", line 392, in process_path
metadata = dfile.get_metadata(
~~~~~~~~~~~~~~~~~~^
digest=file_etag, ignore_errors=allow_any_path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
).model_dump(mode="json", exclude_none=True)
^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/files/bases.py", line 494, in get_metadata
metadata = nwb2asset(self.filepath, digest=digest)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/metadata/nwb.py", line 149, in nwb2asset
metadata = get_metadata(nwb_path)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/fscacher/cache.py", line 164, in fingerprinter
ret = fingerprinted(*args, **kwargs_)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/joblib/memory.py", line 607, in __call__
return self._cached_call(args, kwargs, shelving=False)[0]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/joblib/memory.py", line 562, in _cached_call
return self._call(call_id, args, kwargs, shelving)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/joblib/memory.py", line 832, in _call
output = self.func(*args, **kwargs)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/fscacher/cache.py", line 100, in fingerprinted
return f(path, *args, **kwargs)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/metadata/nwb.py", line 106, in get_metadata
meta.update(_get_pynwb_metadata(r))
~~~~~~~~~~~~~~~~~~~^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/pynwb_utils.py", line 279, in _get_pynwb_metadata
session_duration = _get_session_duration(nwb)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/pynwb_utils.py", line 350, in _get_session_duration
start = float(np.min(np.r_[st_data[0], st_data[idxs[:-1]]]))
~~~~~~~^^^^^^^^^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/hdmf/container.py", line 1002, in __getitem__
return self.get(args)
~~~~~~~~^^^^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/hdmf/common/table.py", line 61, in get
return super().get(key)
~~~~~~~~~~~^^^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/hdmf/container.py", line 1010, in get
return self.data[args]
~~~~~~~~~^^^^^^
File "h5py/_objects.pyx", line 56, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 57, in h5py._objects.with_phil.wrapper
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/h5py/_hl/dataset.py", line 893, in __getitem__
selection = sel.select(self.shape, args, dataset=self)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/h5py/_hl/selections.py", line 82, in select
return selector.make_selection(args)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "h5py/_selector.pyx", line 282, in h5py._selector.Selector.make_selection
File "h5py/_selector.pyx", line 215, in h5py._selector.Selector.apply_args
TypeError: Indexing elements must be in increasing order
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/upload.py", line 396, in process_path
raise UploadError("failed to extract metadata: %s" % str(e))
dandi.exceptions.UploadError: failed to extract metadata: Indexing elements must be in increasing order
2026-05-28T16:06:11+0100 [DEBUG ] urllib3.connectionpool 923713:127941258118976 Starting new HTTPS connection (1): rig.mit.edu:443
2026-05-28T16:06:16+0100 [DEBUG ] dandi 923713:127941258118976 Caught exception failed to extract metadata: Indexing elements must be in increasing order
Traceback (most recent call last):
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/upload.py", line 392, in process_path
metadata = dfile.get_metadata(
~~~~~~~~~~~~~~~~~~^
digest=file_etag, ignore_errors=allow_any_path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
).model_dump(mode="json", exclude_none=True)
^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/files/bases.py", line 494, in get_metadata
metadata = nwb2asset(self.filepath, digest=digest)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/metadata/nwb.py", line 149, in nwb2asset
metadata = get_metadata(nwb_path)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/fscacher/cache.py", line 164, in fingerprinter
ret = fingerprinted(*args, **kwargs_)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/joblib/memory.py", line 607, in __call__
return self._cached_call(args, kwargs, shelving=False)[0]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/joblib/memory.py", line 562, in _cached_call
return self._call(call_id, args, kwargs, shelving)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/joblib/memory.py", line 832, in _call
output = self.func(*args, **kwargs)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/fscacher/cache.py", line 100, in fingerprinted
return f(path, *args, **kwargs)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/metadata/nwb.py", line 106, in get_metadata
meta.update(_get_pynwb_metadata(r))
~~~~~~~~~~~~~~~~~~~^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/pynwb_utils.py", line 279, in _get_pynwb_metadata
session_duration = _get_session_duration(nwb)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/pynwb_utils.py", line 350, in _get_session_duration
start = float(np.min(np.r_[st_data[0], st_data[idxs[:-1]]]))
~~~~~~~^^^^^^^^^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/hdmf/container.py", line 1002, in __getitem__
return self.get(args)
~~~~~~~~^^^^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/hdmf/common/table.py", line 61, in get
return super().get(key)
~~~~~~~~~~~^^^^^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/hdmf/container.py", line 1010, in get
return self.data[args]
~~~~~~~~~^^^^^^
File "h5py/_objects.pyx", line 56, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 57, in h5py._objects.with_phil.wrapper
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/h5py/_hl/dataset.py", line 893, in __getitem__
selection = sel.select(self.shape, args, dataset=self)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/h5py/_hl/selections.py", line 82, in select
return selector.make_selection(args)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "h5py/_selector.pyx", line 282, in h5py._selector.Selector.make_selection
File "h5py/_selector.pyx", line 215, in h5py._selector.Selector.apply_args
TypeError: Indexing elements must be in increasing order
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/cli/base.py", line 126, in wrapper
return f(*args, **kwargs)
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/cli/cmd_upload.py", line 113, in upload
upload_(
~~~~~~~^
paths,
^^^^^^
...<9 lines>...
validation_log_path=companion,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/upload.py", line 505, in upload
raise upload_err
File "/home/nolanlab/fromgit/nolanlab_nwb/.venv/lib/python3.13/site-packages/dandi/upload.py", line 396, in process_path
raise UploadError("failed to extract metadata: %s" % str(e))
dandi.exceptions.UploadError: failed to extract metadata: Indexing elements must be in increasing order
I don't know what this means, or how to proceed.
Strange things:
dandi validateruns fine.- the metadata is generated in the same way for all nwb files, so I don' t understand why only one of them would fail.
- When I open the nwb file using pynwb, it looks fine and all the metadata looks reasonable.
Any advice very welcome!
- Ngôn ngữ chính
- Python
- Star
- 28
- Fork
- 37
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dandi/dandi-cli
-
pynwb metadata: get neurodata typesCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`metadata.nwb.get_metadata()` validates the whole BIDS dataset for every NWB file, then discards the resultCó thể đã có người làm @CodyCBakerPhD đã nhận 19 ngày trước. Đang mởBIDS performance
dandi/dandi-cli#1962 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
BIDS bug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
dandi/dandi-cli#1961 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
dandi/dandi-cli#1920 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của dandi/dandi-cli
Issue tương tự
-
URLValidator ignores an explicit empty scheme allowlistCó thể đã có người làm @IlyaKhalafi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
tortoise/tortoise-orm#2393 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
frappe/frappe_docker#2046 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Weekly link check failedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
complete_box_iou_loss / complete_box_iou: NaN gradients for zero-height boxes, NaN for point boxesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
AXI SMU SPEC
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
tenstorrent/tt-oca-harness#3556 ·
Maintainer thường phản hồi trong vòng 1 ngày