From 1f2024e85f3b53ff68fc0d027ec5b81eb86927fc Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 15 May 2026 21:04:20 +0900 Subject: [PATCH] Fix AttributeError on startup: resolve App.slot_var via winfo_toplevel ScreenshotFrame previously read master.master.slot_var, but master is the Notebook and master.master is the inner padding Frame inside App._build, not App. Use winfo_toplevel() so we always reach the App where slot_var lives. Reported as: AttributeError: 'Frame' object has no attribute 'slot_var' at gui.py:401 during run.py startup. --- sephiria_inv/gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sephiria_inv/gui.py b/sephiria_inv/gui.py index 41c1f07..fd419ff 100644 --- a/sephiria_inv/gui.py +++ b/sephiria_inv/gui.py @@ -398,7 +398,7 @@ class ScreenshotFrame(ttk.Frame): def __init__(self, master, on_confirmed) -> None: super().__init__(master, padding=6) self.on_confirmed = on_confirmed - self.slot_var = master.master.slot_var # type: ignore[attr-defined] + self.slot_var = master.winfo_toplevel().slot_var # type: ignore[attr-defined] self.image: Optional[Image.Image] = None self.bbox: Optional[Tuple[int, int, int, int]] = None self.cells: List[CellResult] = []