The code is breaking exactly right here, once examined through your massive amount of print statements. Turns out ReIterateThroughDataBaseGreaterThanZero (X,YIn,Params) totally doesn’t work and it seems to be the smoking gun, at least you hope that’s what it is. The print after ReIterateThroughDataBaseGreaterThanZero (X,YIn,Params) is not printing anything in your debug logger. The function itself is inside like three nested Try-Catch statements and a long qualifying if statement with some unexplained value called ‘Sensitivity’ being compared to something called ‘X_Vec_Last’.
What do ya do?