IndEcol / RECC-ODYM

The RECC model
MIT License
21 stars 10 forks source link

"Default" subfolder alters msf.check_dataset functioning #74

Open CarrerF opened 9 months ago

CarrerF commented 9 months ago

Hi @chauenstein, I have seen that in the commit #66 you have added the subfolder to the check_dataset in msf. However, it seems to me that the corresponding change in odym might not work as intended.

If a dataset, whose location should be the default, does not exist, then the first "if" instance is triggered, and the second "if" statement will trigger an error, because the folder os.listdir(os.path.join(path, PL_SubFolder[m])) does not exist for PL_SubFolder[m]='default'.

Am I missing something?

The current code gives me this error (subfolder "default" of the dataset indeed does not exist) :

File "...\RECC-ODYM-master\odym\odym\modules\ODYM_Functions.py", line 1432, in check_dataset
    if PL_Names[m]+'_'+PL_Version[m]+'.xlsx' not in os.listdir(os.path.join(path, PL_SubFolder[m])):

FileNotFoundError: [WinError 3] The system cannot find the path specified: '\\\\...\\RECC-ODYM-master\\Dataset\\default'

I get the code running with this adjustment in check_dataset: image

Is this how it is meant to work?

chauenstein commented 9 months ago

Hi @CarrerF thanks for spotting this! No, you didn't miss anything. Your alternative looks good to me. I'll adjust that accordingly. (And sorry for not reacting earlier, somehow the message regarding your comment had slipped my attention)