NREL/rdtools

CODS bootstrapping returns None when soiling signal is small

martin-springer opened this issue · 1 comments

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).

Here is a link to the return statement that causes the exception:

return

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.

Closing as duplicate of #369