NWB-export.ipynb error
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
- 35/100
Hướng nghiên cứu
Chạy NWB-export.ipynb với các phiên bản Element được liệt kê để tái hiện cả hai lỗi, sau đó đọc element_lab/export/nwb.py tại _lab_to_nwb_dict và các ô notebook chèn và lấy dữ liệu phòng thí nghiệm. Hoàn tất khi notebook chạy mà không có lỗi tiêu đề bảng và quá trình xuất dữ liệu phòng thí nghiệm trả về bản ghi mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Report
NWB-export.ipynb may be outdated. It yields the following errors described below.
Description
-
It inserts "institution" into
lab.Lab, which doesn't exist in the table heading. -
(lab.Lab * lab.Lab.Organization * lab.Organization & lab_key)returns empty table sincelab.Lab.Organizationis empty.
Reproducibility
Include:
-
OS (WIN)
-
DataJoint Element Version
element-animal>=0.1.5
element-array-ephys>=0.2.4
element-electrode-localization>=0.1.2
element-event>=0.1.2
element-interface>=0.5.0
element-lab>=0.2.0
element-session>=0.1.2 -
MySQL Deployment Strategy (local-docker)
-
Complete error stack as a result of evaluating the above steps
KeyError Traceback (most recent call last)
Cell In[19], line 2
1 ## If you don't already have data in the Element Lab
----> 2 lab.Lab.insert1(
3 {
4 **lab_key,
5 "lab_name": "LabA",
6 "institution": "",
7 "address": "",
8 "time_zone": "UTC+0",
9 },
10 skip_duplicates=True,
11 )
12 lab.ProtocolType.insert1({"protocol_type": "A"})
13 lab.Protocol.insert1({**protocol_key, "protocol_type": "A"}, skip_duplicates=True)
File [c:\Users\jaero\miniconda3\envs\workflow-array-ephys\lib\site-packages\datajoint\table.py:337](file:///C:/Users/jaero/miniconda3/envs/workflow-array-ephys/lib/site-packages/datajoint/table.py:337), in Table.insert1(self, row, **kwargs)
330 def insert1(self, row, **kwargs):
331 """
332 Insert one data record into the table. For ``kwargs``, see ``insert()``.
333
334 :param row: a numpy record, a dict-like object, or an ordered sequence to be inserted
335 as one row.
336 """
...
859 )
860 elif set(field_list) != set(fields).intersection(self.heading.names):
861 raise DataJointError("Attempt to insert rows with different fields.")
KeyError: '`institution` is not in the table heading'
Output exceeds the [size limit](command:workbench.action.openSettings?%5B%22notebook.output.textLineLimit%22%5D). Open the full output data [in a text editor](command:workbench.action.openLargeOutput?8db8f3b2-9105-4915-b964-41d01d620f48)
---------------------------------------------------------------------------
DataJointError Traceback (most recent call last)
Cell In[18], line 2
1 print('Lab:\n')
----> 2 print(element_lab_to_nwb_dict(lab_key=lab_key, protocol_key=protocol_key,
3 project_key=project_key))
4 print('\nAnimal:\n')
5 print(subject_to_nwb(session_key=session_key))
File [c:\Users\jaero\miniconda3\envs\workflow-array-ephys\lib\site-packages\element_lab\export\nwb.py:112](file:///C:/Users/jaero/miniconda3/envs/workflow-array-ephys/lib/site-packages/element_lab/export/nwb.py:112), in element_lab_to_nwb_dict(lab_key, project_key, protocol_key)
110 element_info = dict()
111 if lab_key:
--> 112 element_info.update(_lab_to_nwb_dict(lab_key))
113 if project_key:
114 element_info.update(_project_to_nwb_dict(project_key))
File [c:\Users\jaero\miniconda3\envs\workflow-array-ephys\lib\site-packages\element_lab\export\nwb.py:19](file:///C:/Users/jaero/miniconda3/envs/workflow-array-ephys/lib/site-packages/element_lab/export/nwb.py:19), in _lab_to_nwb_dict(lab_key)
10 def _lab_to_nwb_dict(lab_key: dict) -> dict:
11 """Generate a dictionary containing all relevant lab and institution info.
12
13 Args:
(...)
17 dict: Dictionary with NWB parameters.
18 """
---> 19 lab_info = (lab.Lab * lab.Lab.Organization * lab.Organization & lab_key).fetch1()
...
344 for name in heading.names
345 )
346 else: # fetch some attributes, return as tuple
DataJointError: fetch1 requires exactly one tuple in the input set.
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 10
- Fork
- 44
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 datajoint/element-array-ephys
-
Migrate to DataJoint 2.x: 14 longblob attributes silently corrupt data, 1 attribute fails to declareĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
datajoint/element-array-ephys#230 ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
datajoint/element-array-ephys#207 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
datajoint/element-array-ephys#206 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
datajoint/element-array-ephys#154 · 1 bình luận ·
-
Cannot find query.csvĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
datajoint/element-array-ephys#162 ·
Tất cả issue của datajoint/element-array-ephys
Issue tương tự
-
oppdatere kodebok med prom dataĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Rapporteket/NORIC#318 ·
-
Report: A few extra shortlinksĐang mởcheck:passed streams:remove
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
GLM-5.3 available on bedrock nowĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/models.dev#8862 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Drained trajectory arrays are overwritten when the sequence buffer is reusedCó thể đã có người làm @sylvesterkaczmarek đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
google-deepmind/bsuite#56 ·