Getting "Error 'NoneType' object has no attribute 'upper'"

For the 1st time entry, it is working fine where Entry, Repair Once and Exit happening properly. But during re-entries, it is unable to interpret Repair Once and exiting abruptly. Notification logs shows the following error.

“Error ‘NoneType’ object has no attribute ‘upper’”

Is exit happening with set exit conditions?
If repair onces is sqauring off the entries and set re-enters due to positions are zero, Repair once will not work after the re-entry.

If more details are provided, can be discussed further.

I do have repair continues with similar situation. still it doesnt work. LTP of traded instrument is not picking last traded price for repair continuous active legs.

If you want set to re-enter then you should square off the last position through set exit conditions and not through repair conditions. If net positions after squaring off through repair conditions are zero, set doesn’t take exit and just renters. Then repair conditions don’t work properly.

ok, thx for the clarification! I will modify my logic accodigly.