aolabNeuro / aolabNeuro/analyze
optitrack metadata breaks when there are commas in any of the keys or values
- Lingua principale
- Python
- Stelle
- 7
- Fork
- 0
- Merge medio
- 22h 29m
- PR unite (30g)
- 2
Descrizione
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
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.