for line in tfile:
    data = line.split()
if abs(float(data[0]) - lreq) <= 0.1 and abs(float(data[1]) - breq) <= 0.1:
    T = data[2]
return T
UnboundLocalError: local variable referenced before assignment when reading from file