{Python} I keep running into error when fixing this code but I don't know what is wrong? It's able to show two windows, but won't load the csv file into the window for a user to select options. My gui should show a window that allows user to select country from file. Then it will print out a graph. This is the code: import sqlite3 import json import matplotlib.pyplot as plt import tkinter as tk import socket import csv import pandas as pd class User_Layer: def __init__(self, root): self.root = root self.root.title("Country Selection") self.country_label = tk.Label(self.root, text="Select a country:") self.country_label.pack() self.country_list = tk.Listbox(self.root) self.country_list.pack() self.countries = pd.read_csv('USAStates2020.csv') ['Country'].unique() for country in self.countries: self.country_list.insert(tk.END, country) self.submit_button = tk.Button(self.root, text="Submit", command=self.submit) self.submit_button.pack() def submit(self): selected_country = self.country_list.get(self.country_list.curselection()) business_layer = BusinessLayer() business_layer.get_data(selected_country) class BusinessLayer: def __init__(self): self.server_host = 'localhost' self.server_port = 9999 def get_data(self, country): sql_query = f"SELECT Year, Population FROM USAStates2020 WHERE Country = '{country}' AND Year BETWEEN 1970 AND 2020" data_layer = DataLayer(self.server_host, self.server_port) data = data_layer.send_query(sql_query) graphic_layer = GraphicLayer() graphic_layer.plot(json.loads(data)) class DataLayer: def __init__(self, host, port): self.host = host self.port = port def send_query(self, query): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.connect((self.host, self.port)) s.sendall(query.encode()) data = s.recv(1024).decode() return data class GraphicLayer: def plot(self, data): df = pd.DataFrame(data) df['Year'] = pd.to_datetime(df['Year'], format='%Y') # Plot the data using matplotlib plt.plot(df['Year'], df['Population']) plt.title('Population vs Year') plt.xlabel('Year') plt.ylabel('Population') plt.show() class ServerLayer: def __init__(self, host, port): self.host = host self.port = port def start(self): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((self.host, self.port)) s.listen() print(f"Server listening on {self.host}:{self.port}") while True: conn, addr = s.accept() with conn: print(f"Connected by {addr}") query = conn.recv(1024).decode() conn.execute(query) results = conn.fetchall() json_data = json.dumps(results) conn.sendall(json_data.encode()) root = tk.Tk() business_layer = __name__ == "__main__" root = tk.Tk() User_Layer = User_Layer(root) root.mainloop().