aolabNeuro / aolabNeuro/analyze

optitrack metadata breaks when there are commas in any of the keys or values

未关闭
#45 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
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 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。