From 64ee74786598dc5d44f6176457fe14ba8af6798b Mon Sep 17 00:00:00 2001 From: Logan Bennett Date: Sat, 25 Apr 2026 16:24:42 -0700 Subject: [PATCH] FIX: Don't crash on non-string BIDS filter values Replace 'not isinstance(value, Query)' with 'isinstance(value, str)' in the bids-filter unserialize step. The previous condition reached 'Query' in value for any non-Query input, which raised TypeError for ints and floats (e.g. {"inv": 2} in a --bids-filter-file). Closes gh-3394. --- fmriprep/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmriprep/config.py b/fmriprep/config.py index e9162e595..c91951285 100644 --- a/fmriprep/config.py +++ b/fmriprep/config.py @@ -527,7 +527,7 @@ def _process_value(value): else: return ( getattr(Query, value[7:-4]) - if not isinstance(value, Query) and 'Query' in value + if isinstance(value, str) and 'Query' in value else value )