diff --git a/element_array_ephys/ephys_acute.py b/element_array_ephys/ephys_acute.py index df7ebd73..056c64ce 100644 --- a/element_array_ephys/ephys_acute.py +++ b/element_array_ephys/ephys_acute.py @@ -890,9 +890,14 @@ def yield_unit_waveforms(): def get_spikeglx_meta_filepath(ephys_recording_key): # attempt to retrieve from EphysRecording.EphysFile - spikeglx_meta_filepath = (EphysRecording.EphysFile & ephys_recording_key - & 'file_path LIKE "%.ap.meta"').fetch1('file_path') - + spikeglx_meta_filepath = pathlib.Path( + ( + EphysRecording.EphysFile + & ephys_recording_key + & 'file_path LIKE "%.ap.meta"' + ).fetch1("file_path") + ) + try: spikeglx_meta_filepath = find_full_path(get_ephys_root_data_dir(), spikeglx_meta_filepath) diff --git a/element_array_ephys/ephys_chronic.py b/element_array_ephys/ephys_chronic.py index 2f6948e6..7c1ebecb 100644 --- a/element_array_ephys/ephys_chronic.py +++ b/element_array_ephys/ephys_chronic.py @@ -835,8 +835,13 @@ def yield_unit_waveforms(): def get_spikeglx_meta_filepath(ephys_recording_key): # attempt to retrieve from EphysRecording.EphysFile - spikeglx_meta_filepath = (EphysRecording.EphysFile & ephys_recording_key - & 'file_path LIKE "%.ap.meta"').fetch1('file_path') + spikeglx_meta_filepath = pathlib.Path( + ( + EphysRecording.EphysFile + & ephys_recording_key + & 'file_path LIKE "%.ap.meta"' + ).fetch1("file_path") + ) try: spikeglx_meta_filepath = find_full_path(get_ephys_root_data_dir(), diff --git a/element_array_ephys/ephys_no_curation.py b/element_array_ephys/ephys_no_curation.py index f0988917..17c45b7f 100644 --- a/element_array_ephys/ephys_no_curation.py +++ b/element_array_ephys/ephys_no_curation.py @@ -849,8 +849,13 @@ def yield_unit_waveforms(): def get_spikeglx_meta_filepath(ephys_recording_key): # attempt to retrieve from EphysRecording.EphysFile - spikeglx_meta_filepath = (EphysRecording.EphysFile & ephys_recording_key - & 'file_path LIKE "%.ap.meta"').fetch1('file_path') + spikeglx_meta_filepath = pathlib.Path( + ( + EphysRecording.EphysFile + & ephys_recording_key + & 'file_path LIKE "%.ap.meta"' + ).fetch1("file_path") + ) try: spikeglx_meta_filepath = find_full_path(get_ephys_root_data_dir(),