I missed that
it should be
it doesn't actually need two for loop in FormFrame, it can be changed to
it should be
for row_index, text in ( (1, 'Fecha de medición : '), (2, 'Hora de medición : '), (4, 'Voltage de Panel 1 : '), (5, 'Voltage de Panel 2 : '), (6, 'Voltage de Panel 3 : '), (7, 'Promedio : '), (9, 'Panel con Menor Voltaje : ')): label = tk.Label(self, text=text)
it doesn't actually need two for loop in FormFrame, it can be changed to
class FormFrame(tk.Frame): def __init__(self, *args, **kwargs) -> None: kwargs['width'] = '1200' kwargs['height'] = '600' super().__init__(*args, **kwargs) self.config(bg="#98A7AC") self.str_variables = [] label1 = tk.Label( self, text="Sistema de monitoreo de Paneles del SESLab", font=18) label1.grid(row=0, column=0, padx=5, pady=5, columnspan=2) for row_index, text in ( (1, 'Fecha de medición : '), (2, 'Hora de medición : '), (4, 'Voltage de Panel 1 : '), (5, 'Voltage de Panel 2 : '), (6, 'Voltage de Panel 3 : '), (7, 'Promedio : '), (9, 'Panel con Menor Voltaje : ')): label = tk.Label(self, text=text) label.grid(row=row_index, column=0, padx=2, pady=5) str_variable = tk.StringVar() entry = tk.Entry(self, textvariable=str_variable) entry.grid(row=row_index, column=1, padx=1, pady=5) entry.config(fg="black", justify="center", state='readonly') self.str_variables.append(str_variable) @tk_after def set_str_variables(self, results): for str_variable, result in zip(self.str_variables, results): str_variable.set(result)