UnboundLocalError: local variable 'e1' referenced before assignment

Thank you. As you said, the problem is solved.