How to solve this TypeError: '>' not supported between instances of 'NoneType' and 'int' in python

Viewed 32

I used all the technique mention online to solve below error "TypeError: '>' not supported between instances of 'NoneType' and 'int'" but failed.

here is my code

---
def checkfun()
    ---
    if (CheckBottomYCoVaring(length) == True):
    ---

def CheckBottomYCoVaring(length):
    result = False
    if (TempBotY > PrevbottomY[length]):
        if (TempBotY - PrevbottomY[length]) < 3:
            result = True
        else:
            result =  False
    else:
        if (PrevbottomY[length] - TempBotY) < 3:
            result = True
        else:
            result = False
    return result
1 Answers
Related