LivingPark-MRI / livingpark-utils

A collection of utility functions to write LivingPark notebooks
MIT License
2 stars 9 forks source link

Missing files when downloading study files #46

Open niyonx opened 1 year ago

niyonx commented 1 year ago

I'm getting missing files when running

required_files = [
    "Demographics.csv",
    "Age_at_visit.csv",
    "MDS_UPDRS_Part_III.csv",
    "Socio-Economics.csv",
    "LEDD_Concomitant_Medication_Log.csv",
    "Montreal_Cognitive_Assessment__MoCA_.csv",
    "PD_Diagnosis_History.csv",
    "Cognitive_Categorization.csv",
    "Participant_Status.csv",
    "Primary_Clinical_Diagnosis.csv",
    "Geriatric_Depression_Scale__Short_Version_.csv"
]

utils.get_study_files(required_files, default=downloader)

The output:

("Downloading files: ['Age_at_visit.csv', 'MDS_UPDRS_Part_III.csv', "
 "'Socio-Economics.csv', 'LEDD_Concomitant_Medication_Log.csv', "
 "'Montreal_Cognitive_Assessment__MoCA_.csv', 'PD_Diagnosis_History.csv', "
 "'Participant_Status.csv', 'Geriatric_Depression_Scale__Short_Version_.csv']")
LivingPark-utils|DEBUG|ppmi_downloader.py:106 in __init__()
                       self.tempdir: <TemporaryDirectory '/tmp/tmpx6fd5bz1'>
LivingPark-utils|DEBUG|ppmi_downloader.py:117 in __init__()
                       self.config_file: '.ppmi_config'
                       config_file: '.ppmi_config'
 25%|██████████▊                                | 2/8 [00:00<00:00, 2724.46it/s]
("Missing files: ['Age_at_visit.csv', 'MDS_UPDRS_Part_III.csv', "
 "'Socio-Economics.csv', 'LEDD_Concomitant_Medication_Log.csv', "
 "'Montreal_Cognitive_Assessment__MoCA_.csv', 'PD_Diagnosis_History.csv', "
 "'Participant_Status.csv', 'Geriatric_Depression_Scale__Short_Version_.csv']")
mathdugre commented 1 year ago

Hi @niyonx , there's currently downloading some files due to miss match between the expected and actual filename. For example, the downloader expects SocioEconomics.csv, while the actual file name is Socio-Economics.csv.

@yohanchatelain was there some advancement on https://github.com/LivingPark-MRI/ppmi-scraper/issues/43 to resolve this issue?

niyonx commented 1 year ago

@mathdugre yes indeed.

It's weird last time Demographics.csv was downloaded, then I run the notebook on MacOS and it's now missing as well.