UnboundLocalError: local variable 'e1' referenced before assignment

all of A, t, tau, S, and object_t_change is numeric value. Wherein, A is a matrix, t /tau is numpy.array, S is a int type value. E.g. t = history_data[‘time’].values