UnboundLocalError: cannot access local variable 'drs_path' where it is not associated with a value :: SKIPPED :: /root/src-cordexcmip6files/flat/uas_EUR-12_ERA5_evaluation_r1i1p1f1_HCLIMcom-SMHI_HCLIM43-ALADIN_v1-r1_mon_200101-201012.nc Traceback (most recent call last): File "/root/esgf-prepare/esgprep/drs/make.py", line 126, in __call__ if len(drs_path.errors) != 0:
The assignment to drs_path happens inside of a condition, if self.project == 'cmip6', while drs_path.errors is being tested outside of the conditional block. If the project isn't cmip6, this would result in the above-noted exception.
A suggestion is to initialize drs_path to None, before the condition, and later, first check to ensure that drs_path is not None prior to checking for drs_path.errors.