fixes to cross platform saves

This commit is contained in:
2025-10-15 17:09:51 -07:00
parent 5361f6ea21
commit b5afcec37d
2 changed files with 56 additions and 9 deletions

View File

@@ -3069,5 +3069,16 @@ def process_participant(file_path, progress_callback=None):
if progress_callback: progress_callback(20)
logger.info("20")
sanitize_paths_for_pickle(raw_haemo, epochs)
return raw_haemo, epochs, fig_bytes, cha, contrast_results, df_ind, design_matrix, AGE, GENDER, GROUP, True
return raw_haemo, epochs, fig_bytes, cha, contrast_results, df_ind, design_matrix, AGE, GENDER, GROUP, True
def sanitize_paths_for_pickle(raw_haemo, epochs):
# Fix raw_haemo._filenames
if hasattr(raw_haemo, '_filenames'):
raw_haemo._filenames = [str(p) for p in raw_haemo._filenames]
# Fix epochs._raw._filenames
if hasattr(epochs, '_raw') and hasattr(epochs._raw, '_filenames'):
epochs._raw._filenames = [str(p) for p in epochs._raw._filenames]