poldracklab / fitlins

Fit Linear Models to BIDS Datasets
https://fitlins.readthedocs.io
Apache License 2.0
76 stars 32 forks source link

Check if model file is valid prior to starting workflow #310

Open adelavega opened 3 years ago

adelavega commented 3 years ago

To avoid confusion like this: https://neurostars.org/t/fitlins-cant-use-the-model-fitlins-example-rhyme-judgment/20030

I think it would be better if we explicitly check for the file's existence and spit out a nicer error.

shashankbansal6 commented 3 years ago

++1 on a nicer error for sure. I think I was seeing this exact error in one of the fitlins tests and the issue took me a while to understand. I did add a slightly better error message in the refactor:

https://github.com/poldracklab/fitlins/blob/747c91441f4e34eed31be07683e02af0e2700bfb/fitlins/cli/run.py#L270-L271