From 06bb1b9bfde4bbf993b89a20ff6bf359370489eb Mon Sep 17 00:00:00 2001 From: DJP Date: Mon, 13 Apr 2026 13:23:25 -0400 Subject: [PATCH] Fix deep extraction crash: unescaped curly braces in f-string Root cause: "name 'name' is not defined" error on line 300 The f-string example {name:"KV 360", tier:"Tier B"} was interpreted as Python set literal, not as JSON text. Changed to parentheses. Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/app/services/doc_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/services/doc_parser.py b/backend/app/services/doc_parser.py index 3e5d0c2..fdf3606 100644 --- a/backend/app/services/doc_parser.py +++ b/backend/app/services/doc_parser.py @@ -297,7 +297,7 @@ STRUCTURAL ANALYSIS: IMPORTANT GUIDELINES: - Use the column mapping from the analysis to identify asset names, descriptions, tiers, and volumes - CRITICAL: If the document has tier columns (Tier A/B/C etc.), create a SEPARATE entry for EACH tier where volume > 0 or status = "Yes" -- Example: "KV 360" with Tier A=No/0, Tier B=Yes/1, Tier C=Yes/1 → TWO entries: {name:"KV 360", tier:"Tier B", volume:1} and {name:"KV 360", tier:"Tier C", volume:1} +- Example: "KV 360" with Tier A=No/0, Tier B=Yes/1, Tier C=Yes/1 → TWO entries: (name="KV 360", tier="Tier B", volume=1) and (name="KV 360", tier="Tier C", volume=1) - Do NOT create entries for tiers with volume=0 or status="No" - Skip rows that are questions, metadata, or caveats — those are not deliverables - Carry forward category names from merged cells (the analysis explains the hierarchy)