use format instead of fstring
@@ -1204,7 +1204,7 @@ class BIDSLayout(object):
built = build_path(source, path_patterns, strict)
if built is None:
- raise ValueError(f"Unable to construct build path with source {source}")
+ raise ValueError("Unable to construct build path with source {}".format(source))
to_check = os.path.join(os.path.sep, built)
if not validate or BIDSValidator().is_bids(to_check):
