aolabNeuro / aolabNeuro/analyze
optitrack metadata breaks when there are commas in any of the keys or values
- 主要语言
- Python
- 星标
- 7
- 派生
- 0
- 平均合并
- 22 小时 29 分钟
- 30 天内合并 PR
- 2
描述
not sure if we can do anything about this, but i get a list index out of range error when using `load_optitrack_metadata()` if the filename has commas in it (this one is called "Chair sequential (up, right, left, down).csv"), which appears as the "take name" entry in the first row of the csv file, commas included. because there are an even number of commas in the name, there ends up being an odd number of columns, so the error pops up.
```
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in
----> 1 metadata = aopy.data.load_optitrack_metadata(data_dir, filename, metadata_row=0)
2 print(metadata)
~/leo/analyze/aopy/data.py in load_optitrack_metadata(data_dir, filename, metadata_row)
88 # For every pair of values in the list add to dict
89 for idx_dictval in range(0, len(row), 2):
---> 90 mocap_metadata[row[idx_dictval]]= row[idx_dictval + 1]
91
92 # Get Rigid body name for each column
IndexError: list index out of range
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。