Ihave the following issue: Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1968, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 116, in <lambda>
    minus_button.bind("<Button-1>", lambda e: delete_entry(tree, item))
                                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 62, in delete_entry
    item_values = tree.item(item, "values")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 1356, in item
    return _val_or_dict(self.tk, kw, self._w, "item", item)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 281, in _val_or_dict
    res = tk.call(*(args + options))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: Item I002 not found
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1968, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 116, in <lambda>
    minus_button.bind("<Button-1>", lambda e: delete_entry(tree, item))
                                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 62, in delete_entry
    item_values = tree.item(item, "values")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 1356, in item
    return _val_or_dict(self.tk, kw, self._w, "item", item)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 281, in _val_or_dict
    res = tk.call(*(args + options))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: Item I002 not found
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1968, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 116, in <lambda>
    minus_button.bind("<Button-1>", lambda e: delete_entry(tree, item))
                                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 62, in delete_entry
    item_values = tree.item(item, "values")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 1356, in item
    return _val_or_dict(self.tk, kw, self._w, "item", item)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 281, in _val_or_dict
    res = tk.call(*(args + options))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: Item I002 not found
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1968, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 116, in <lambda>
    minus_button.bind("<Button-1>", lambda e: delete_entry(tree, item))
                                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 62, in delete_entry
    item_values = tree.item(item, "values")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 1356, in item
    return _val_or_dict(self.tk, kw, self._w, "item", item)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 281, in _val_or_dict
    res = tk.call(*(args + options))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: Item I002 not found
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1968, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 116, in <lambda>
    minus_button.bind("<Button-1>", lambda e: delete_entry(tree, item))
                                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 62, in delete_entry
    item_values = tree.item(item, "values")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 1356, in item
    return _val_or_dict(self.tk, kw, self._w, "item", item)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 281, in _val_or_dict
    res = tk.call(*(args + options))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: Item I002 not found
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1968, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 116, in <lambda>
    minus_button.bind("<Button-1>", lambda e: delete_entry(tree, item))
                                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Bilder\Python\0. Code\Database 1.py", line 62, in delete_entry
    item_values = tree.item(item, "values")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 1356, in item
    return _val_or_dict(self.tk, kw, self._w, "item", item)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Zarathustra\AppData\Local\Programs\Python\Python312\Lib\tkinter\ttk.py", line 281, in _val_or_dict
    res = tk.call(*(args + options))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: Item I00E not found    Code: import tkinter as tk
from tkinter import ttk
import sqlite3

def run_query(query, parameters=()):
    with sqlite3.connect('media.db') as conn:
        cursor = conn.cursor()
        result = cursor.execute(query, parameters)
        if query.strip().lower().startswith("select"):
            return result.fetchall()
        conn.commit()

def create_tables():
    create_movies_table_sql = '''
    CREATE TABLE IF NOT EXISTS movies (
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        movie TEXT,
        year INTEGER,
        present BOOLEAN,
        watched BOOLEAN,
        notes TEXT
    );
    '''
    create_series_table_sql = '''
    CREATE TABLE IF NOT EXISTS series (
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        series TEXT,
        seasons TEXT,
        year TEXT,
        present BOOLEAN,
        seasons_present TEXT,
        complete BOOLEAN,
        watched BOOLEAN,
        seasons_seen TEXT,
        notes TEXT
    );
    '''
    run_query(create_movies_table_sql)
    run_query(create_series_table_sql)

def load_data():
    for row in movies_tree.get_children():
        movies_tree.delete(row)
    for row in series_tree.get_children():
        series_tree.delete(row)
    
    for row in run_query('SELECT * FROM movies'):
        movies_tree.insert('', 'end', values=row[1:])
    
    for row in run_query('SELECT * FROM series'):
        series_tree.insert('', 'end', values=row[1:])

def add_entry(tree):
    if tree == movies_tree:
        run_query("INSERT INTO movies (movie, year, present, watched, notes) VALUES (?, ?, ?, ?, ?)", ('', None, None, None, ''))
    elif tree == series_tree:
        run_query("INSERT INTO series (series, seasons, year, present, seasons_present, complete, watched, seasons_seen, notes) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", ('', '', '', None, '', None, None, '', ''))
    
    load_data()

def delete_entry(tree, item):
    item_values = tree.item(item, "values")
    if tree == movies_tree:
        run_query("DELETE FROM movies WHERE movie = ? AND year = ?", (item_values[0], item_values[1]))
    elif tree == series_tree:
        run_query("DELETE FROM series WHERE series = ? AND year = ?", (item_values[0], item_values[2]))
    
    load_data()

def save_edit(tree, item, col, new_value):
    tree.set(item, column=col, value=new_value)

    if tree == movies_tree:
        columns = ["movie", "year", "present", "watched", "notes"]
        values = movies_tree.item(item, 'values')
        run_query(f"UPDATE movies SET {columns[col]} = ? WHERE movie = ? AND year = ?", (new_value, values[0], values[1]))
    elif tree == series_tree:
        columns = ["series", "seasons", "year", "present", "seasons_present", "complete", "watched", "seasons_seen", "notes"]
        values = series_tree.item(item, 'values')
        run_query(f"UPDATE series SET {columns[col]} = ? WHERE series = ? AND year = ?", (new_value, values[0], values[2]))

def edit_cell(event, tree):
    selected_item = tree.selection()
    if not selected_item:
        return
    col = tree.identify_column(event.x)[1:]
    if col.isdigit():
        col = int(col) - 1

    def on_edit_complete(event=None):
        new_value = entry_var.get()
        save_edit(tree, selected_item, col, new_value)
        entry.destroy()

    x, y, width, height = tree.bbox(selected_item, column=f'#{col + 1}')
    
    entry_var = tk.StringVar()
    entry = tk.Entry(tree, textvariable=entry_var, width=int(width / 7))
    entry_var.set(tree.item(selected_item, 'values')[col])
    entry.place(x=x, y=y, anchor='nw', height=height, width=width)
    entry.focus_set()
    entry.bind("<Return>", on_edit_complete)
    entry.bind("<FocusOut>", on_edit_complete)

def show_buttons(event, tree, plus_button, minus_button):
    item = tree.identify_row(event.y)
    if item:
        bbox = tree.bbox(item)
        if bbox:
            plus_button.place(x=2, y=bbox[1], width=20, height=bbox[3])
            plus_button.lift()
            minus_button.place(x=24, y=bbox[1], width=20, height=bbox[3])
            minus_button.lift()

            plus_button.bind("<Button-1>", lambda e: add_entry(tree))
            minus_button.bind("<Button-1>", lambda e: delete_entry(tree, item))

def hide_buttons(event, plus_button, minus_button):
    plus_button.place_forget()
    minus_button.place_forget()

def enter_empty_bar(event, tree, plus_button, minus_button):
    show_buttons(event, tree, plus_button, minus_button)

def leave_empty_bar(event, plus_button, minus_button):
    hide_buttons(event, plus_button, minus_button)

def show_movies():
    series_frame.pack_forget()
    movies_frame.pack(expand=True, fill='both')
    empty_frame.bind("<Enter>", lambda event: enter_empty_bar(event, movies_tree, plus_button, minus_button))
    empty_frame.bind("<Leave>", lambda event: leave_empty_bar(event, plus_button, minus_button))
    empty_frame.bind("<Motion>", lambda event: show_buttons(event, movies_tree, plus_button, minus_button))
    empty_frame.pack(expand=False, fill='y', side='left')

def show_series():
    movies_frame.pack_forget()
    series_frame.pack(expand=True, fill='both')
    empty_frame.bind("<Enter>", lambda event: enter_empty_bar(event, series_tree, plus_button, minus_button))
    empty_frame.bind("<Leave>", lambda event: leave_empty_bar(event, plus_button, minus_button))
    empty_frame.bind("<Motion>", lambda event: show_buttons(event, series_tree, plus_button, minus_button))
    empty_frame.pack(expand=False, fill='y', side='left')

root = tk.Tk()
root.title("Movies and Series Tracker")

create_tables()

# Sidebar with buttons
sidebar_frame = tk.Frame(root, width=100, bg='lightgray')
sidebar_frame.pack(side='left', fill='y')

movies_button = tk.Button(sidebar_frame, text="Movies", command=show_movies)
movies_button.pack(fill='x', padx=5, pady=5)

series_button = tk.Button(sidebar_frame, text="Series", command=show_series)
series_button.pack(fill='x', padx=5, pady=5)

# Increase the width of the empty frame for spacing and plus/minus buttons
empty_frame = tk.Frame(root, width=50, bg='white')
empty_frame.pack(expand=False, fill='y', side='left')

# Main content frame
content_frame = tk.Frame(root)
content_frame.pack(side='right', fill='both', expand=True)

movies_frame = tk.Frame(content_frame)
series_frame = tk.Frame(content_frame)

movies_columns = ("Movie", "Year", "Present", "Watched", "Notes")
movies_tree = ttk.Treeview(movies_frame, columns=movies_columns, show='headings')
for column in movies_columns:
    movies_tree.heading(column, text=column)
    movies_tree.column(column, anchor='center')
movies_tree.pack(expand=True, fill='both')
movies_tree.bind('<Double-1>', lambda e: edit_cell(e, movies_tree))

series_columns = ("Series", "Seasons", "Year", "Present", "Seasons Present", "Complete", "Watched", "Seasons (Seen)", "Notes")
series_tree = ttk.Treeview(series_frame, columns=series_columns, show='headings')
for column in series_columns:
    series_tree.heading(column, text=column)
    series_tree.column(column, anchor='center')
series_tree.pack(expand=True, fill='both')
series_tree.bind('<Double-1>', lambda e: edit_cell(e, series_tree))

# Plus and minus buttons with specified colors
plus_button = tk.Label(empty_frame, text="+", bg="white", fg="black", font=("Arial", 12), cursor="hand2")
minus_button = tk.Label(empty_frame, text="-", bg="white", fg="black", font=("Arial", 12), cursor="hand2")

load_data()

show_movies()

root.mainloop()
Print the new code in full. Think step by step.