From 80add0fb0692c28e760d1b0e499fe60940880204 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Tue, 24 Oct 2023 22:19:38 +0200 Subject: [PATCH] BIDSPath no longer warns on missing file (#1181) - closes https://github.com/mne-tools/mne-bids/issues/1178 --- examples/bidspath.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/examples/bidspath.py b/examples/bidspath.py index 65587f609..bfe6cb6e2 100644 --- a/examples/bidspath.py +++ b/examples/bidspath.py @@ -8,7 +8,8 @@ BIDSPath is MNE-BIDS's working horse when it comes to file and folder operations. Learn here how to use it. """ -# Author: Richard Höchenberger +# Authors: Richard Höchenberger +# Stefan Appelhoff # # License: BSD-3-Clause @@ -141,15 +142,9 @@ print(bids_path.fpath) # %% -# Oups! The cell above produced a ``RuntimeWarning`` that our data file could -# not be found. That's because we changed the ``run`` and ``session`` entities -# above, and the ``tiny_bids`` dataset does not contain corresponding data. -# -# That shows us that ``BIDSPath`` is doing a lot of guess-work and checking -# in the background, but note that this may change in the future. -# -# For now, let's revert to the last working iteration of our ``bids_path`` -# instance. +# However, for the sake of the present examples, let's revert to the iteration +# of our ``bids_path`` instance with no ``run`` and ``session="eeg"``, as that +# file exists in the ``tiny_bids`` dataset. bids_path.update(run=None, session="eeg") print(bids_path.fpath)