From 56d09adbb70b1b457dfce2c9e2eb1cff5195cb01 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 24 Sep 2024 10:56:19 -0400 Subject: [PATCH] FIX: Really --- mne/io/fiff/raw.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mne/io/fiff/raw.py b/mne/io/fiff/raw.py index 64ae9486db3..232decd3b3f 100644 --- a/mne/io/fiff/raw.py +++ b/mne/io/fiff/raw.py @@ -121,8 +121,10 @@ def __init__( # (magic) does not store the file-like object. # 2. We need to ensure "filenames" passed to the constructor below gets a list # of Path or None. - # 3. We need to (after calling super().__init__) to remove the file-like objects - # from _raw_extras. + # 3. We need to remove the file-like objects from _raw_extras. This must + # be done *after* the super().__init__ call, because the constructor + # needs the file-like objects to read the data (which it will do because we + # force preloading for file-like objects). # Avoid file-like in _get_argvalues (1) fname = _path_from_fname(fname)