Ignore hidden CSV files in `load_clinical_csv`
Opened this issue · 1 comments
The function load_clinical_csv
from the ADNI-to-BIDS converter is using regex to find and open a clinical CSV file, no matter the date that ADNI appends at the end of the file name.
clinica/clinica/iotools/converters/adni_to_bids/adni_utils.py
Lines 1624 to 1661 in 31543c2
When there are multiple such files, clinica raises an error which is desired since we shouldn't make a choice for the user.
However, it was reported recently by @HuguesRoy that under MacOS, it can happen that a hidden file is created when the CSV file is opened in a GUI application like Excel. In this situation, the load_clinical_csv
function crashes by finding two files, the correct one and the temporary hidden file.
Even though this should not happen a lot in practice, making this function a bit more robust by ignoring hidden files should be pretty straightforward.
This issue is considered stale because it has not received further activity for the last 14 days. You may remove the inactive
label or add a comment, otherwise it will be closed after the next 14 days.