diff --git a/mne_bids/path.py b/mne_bids/path.py index d05f01b47..cb72f02dd 100644 --- a/mne_bids/path.py +++ b/mne_bids/path.py @@ -959,6 +959,8 @@ def update(self, *, check=None, **kwargs): ) if ENTITY_VALUE_TYPE[key] == "label": + if isinstance(val, int): + val = str(val) _validate_type(val, types=(None, str), item_name=key) else: assert ENTITY_VALUE_TYPE[key] == "index"