Skip to content

Conversation

@valosekj
Copy link
Member

@valosekj valosekj commented Jul 9, 2025

Raise a custom error when using * as a wildcard character

@valosekj
Copy link
Member Author

valosekj commented Jul 9, 2025

Using this config

FILES_LESION:
  - *T2w.nii.gz

And getting the custom error:

ERROR: YAML parsing error in /md1/valosek/results/sci-olomouc/sci-olomouc_2025-07-09/config_lesion_sciseg.yml.
The '*' character is a special character in YAML that denotes an alias or anchor.
To use '*' as a wildcard character, start the line with 'sub' string, e.g.: "sub*T2w.nii.gz"
while scanning an alias
  in "/md1/valosek/results/sci-olomouc/sci-olomouc_2025-07-09/config_lesion_sciseg.yml", line 2, column 5
expected alphabetic or numeric character, but found '.'
  in "/md1/valosek/results/sci-olomouc/sci-olomouc_2025-07-09/config_lesion_sciseg.yml", line 2, column 9

@valosekj valosekj merged commit ba70533 into main Jul 9, 2025
1 check passed
@valosekj valosekj deleted the jv/improve_config_parsing branch July 9, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant