Traceback (most recent call last):
File "[REDACTED]/python-osf/examples/./to_csv.py", line 58, in <module>
main(sys.argv[1:])
File "[REDACTED]/python-osf/examples/./to_csv.py", line 35, in main
df = samples.make_column_based()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[REDACTED]/python-osf/src/libosf/core.py", line 149, in make_column_based
df = DataFrame(data=frame_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[REDACTED]/python-osf/venv/lib/python3.11/site-packages/pandas/core/frame.py", line 767, in __init__
mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[REDACTED]/python-osf/venv/lib/python3.11/site-packages/pandas/core/internals/construction.py", line 503, in dict_to_mgr
return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[REDACTED]/python-osf/venv/lib/python3.11/site-packages/pandas/core/internals/construction.py", line 114, in arrays_to_mgr
index = _extract_index(arrays)
^^^^^^^^^^^^^^^^^^^^^^
File "[REDACTED]/python-osf/venv/lib/python3.11/site-packages/pandas/core/internals/construction.py", line 677, in _extract_index
raise ValueError("All arrays must be of the same length")
ValueError: All arrays must be of the same length
It seems that the libosf.core cannot deal with channels of datatype
gpslocation.Running the "to_csv" example with
python3 ./to_csv.py -i example.osf -c GPS.Locationproduces the following stack trace:I already narrowed it down to
get_samplesalready producing a tuple of three arrays with different lengths (i.e., 362, 266, 362) while they should have the same length. The loop starting in L209 always extendsresult_timestampsby 1 element. Whileresult_valuesandresult_indexesare sometimes extended by more than 1 element, hence the lengths diverge.python-osf/src/libosf/core.py
Lines 185 to 218 in 4a4d7ed