Describe the bug
CODS - run_bootstrap returns None when 'Soiling signal is small relative to the noise.' The error message is printed but an exception is not raised. In a successful run, three arguments are returned. In the case of a small soiling signal only one argument (None) is returned, which causes an exception when three arguments are expected from the function as is the case in the tutorial example results_df, degradation, soiling_loss = CODS.run_bootstrap(reps=16, verbose=True).
Describe the bug CODS -
run_bootstrap
returnsNone
when 'Soiling signal is small relative to the noise.' The error message is printed but an exception is not raised. In a successful run, three arguments are returned. In the case of a small soiling signal only one argument (None
) is returned, which causes an exception when three arguments are expected from the function as is the case in the tutorial exampleresults_df, degradation, soiling_loss = CODS.run_bootstrap(reps=16, verbose=True)
.Here is a link to the return statement that causes the exception: https://github.com/NREL/rdtools/blob/20bc73ce7af485a0eca6d0a063ca0a324978340b/rdtools/soiling.py#L1769
Full error message and traceback TypeError: cannot unpack non-iterable NoneType object
To Reproduce Run CODS bootstrapping on: 5169 | ac_power_inv_2831 with
result_df, degradation, soiling_loss = CODS.run_bootstrap(**params_CODS)
Expected behavior Raise exception instead of printing error or return the correct number of arguments.