'None type' object has not attribute error

enter image description here Traceback (most recent call last): AttributeError: 'NoneType' object has no attribute 'reverse', I don't know why the function name is none type. Thank you for ur answer in advance!