Open Mq89 opened 6 months ago
Yes, the "to_csv.py" script does not handle the gpslocation datatype correctly and it will crash. We will fix the script in the next 1-2 weeks - sorry we are really busy at the moment. In the "print_channel_data.py" script you see how the datatype is handled correctly. Also we will check the issue with the different signal lengths.
It seems that the libosf.core cannot deal with channels of datatype
gpslocation
. Running the "to_csv" example withpython3 ./to_csv.py -i example.osf -c GPS.Location
produces the following stack trace:I already narrowed it down to
get_samples
already 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_timestamps
by 1 element. Whileresult_values
andresult_indexes
are sometimes extended by more than 1 element, hence the lengths diverge.https://github.com/optimeas/python-osf/blob/4a4d7edee679b8fcde13de8e1c9847a553b117f7/src/libosf/core.py#L185-L218