process peri-event reads TRIALS_PATH with pd.read_csv unconditionally (process/__init__.py:483). Passing a binary file, e.g. the recording HDF5 when the positional arguments are swapped, fails with a pandas decode error rather than a usable message:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
Suggested fix
Validate trials_path before reading: require a .csv suffix, and raise a click.ClickException naming the file if the read fails or the required event column is missing.
process peri-eventreadsTRIALS_PATHwithpd.read_csvunconditionally (process/__init__.py:483). Passing a binary file, e.g. the recording HDF5 when the positional arguments are swapped, fails with a pandas decode error rather than a usable message:Suggested fix
Validate
trials_pathbefore reading: require a.csvsuffix, and raise aclick.ClickExceptionnaming the file if the read fails or the required event column is missing.