IndEcol / RECC-ODYM

The RECC model
MIT License
21 stars 10 forks source link

too many statements in try-except clause for loading existing .dat file #68

Open stefanpauliuk opened 11 months ago

stefanpauliuk commented 11 months ago

There are 40 lines of code in the following try-except clause: try: # Load Pickle parameter dict to save processing time That means any error within these many commands will give no error message and the same result: The .dat file is not read and all parameter files are re-read. Consider a introducing a leaner exception handling here, or add more error messages at least! Not sure whether it's good style to have nexted try-except clauses...

CarrerF commented 11 months ago

By replacing try-except with

if ParFileName in os.listdir(RECC_Paths.data_path): .. else: ..

it should give an error message pointing at the line in which it's happening, rather then the general try-except error message.