Hi there,
I am using the mne.io.read_raw_eyelink function and am encountering an issue for some of my subjects where the adjust times sub function in utils throws an error. I am using:
- MNE version: 1.7.1
- operating system: macOS 14.5
When running mne.io.read_raw_eyelink(f'{path}/P7.asc', create_annotations=["messages"])
, I get this error:
File "/Users/teichmanna2/anaconda3/envs/occ_beh/lib/python3.9/site-packages/mne/io/eyelink/eyelink.py", line 62, in read_raw_eyelink
raw_eyelink = RawEyelink(
File "<decorator-gen-202>", line 12, in __init__
File "/Users/teichmanna2/anaconda3/envs/occ_beh/lib/python3.9/site-packages/mne/io/eyelink/eyelink.py", line 107, in __init__
eye_ch_data, info, raw_extras = _parse_eyelink_ascii(
File "/Users/teichmanna2/anaconda3/envs/occ_beh/lib/python3.9/site-packages/mne/io/eyelink/_utils.py", line 71, in _parse_eyelink_ascii
raw_extras["dfs"]["samples"] = _adjust_times(
File "/Users/teichmanna2/anaconda3/envs/occ_beh/lib/python3.9/site-packages/mne/io/eyelink/_utils.py", line 509, in _adjust_times
return pd.merge_asof(
File "/Users/teichmanna2/anaconda3/envs/occ_beh/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 708, in merge_asof
return op.get_result()
File "/Users/teichmanna2/anaconda3/envs/occ_beh/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 1926, in get_result
join_index, left_indexer, right_indexer = self._get_join_info()
File "/Users/teichmanna2/anaconda3/envs/occ_beh/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 1151, in _get_join_info
(left_indexer, right_indexer) = self._get_join_indexers()
File "/Users/teichmanna2/anaconda3/envs/occ_beh/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 2239, in _get_join_indexers
right_values = self._convert_values_for_libjoin(right_values, "right")
File "/Users/teichmanna2/anaconda3/envs/occ_beh/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 2182, in _convert_values_for_libjoin
raise ValueError(f"{side} keys must be sorted")
ValueError: right keys must be sorted
To replicate the error, I uploaded the data here: eyetracking_example - Google Drive
I tried to sort the values for the data frames before merging but am then running into errors down the line.
Any help would be greatly appreciated!
Thanks,
Lina