From 94b8e4a947bfc9ec71db8e9c245dbb721623542b Mon Sep 17 00:00:00 2001 From: vivekshekharrai-del Date: Sat, 7 Mar 2026 22:10:26 -0600 Subject: [PATCH] Fix UnicodeEncodeError in doctor command on Windows Replace non-ASCII characters (em dash U+2014, right arrow U+2192) with ASCII equivalents in console.print() calls inside the doctor command. On Windows with CP1252 console encoding, these characters raise: UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' Affected lines: resume.txt WARN note, searches.yaml WARN note, tier summary header, and Tier 2/3 unlock hint messages. Co-Authored-By: Claude Sonnet 4.6 --- src/applypilot/cli.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/applypilot/cli.py b/src/applypilot/cli.py index 6c8be91..d370f38 100644 --- a/src/applypilot/cli.py +++ b/src/applypilot/cli.py @@ -360,7 +360,7 @@ def doctor() -> None: if RESUME_PATH.exists(): results.append(("resume.txt", ok_mark, str(RESUME_PATH))) elif RESUME_PDF_PATH.exists(): - results.append(("resume.txt", warn_mark, "Only PDF found — plain-text needed for AI stages")) + results.append(("resume.txt", warn_mark, "Only PDF found - plain-text needed for AI stages")) else: results.append(("resume.txt", fail_mark, "Run 'applypilot init' to add your resume")) @@ -368,7 +368,7 @@ def doctor() -> None: if SEARCH_CONFIG_PATH.exists(): results.append(("searches.yaml", ok_mark, str(SEARCH_CONFIG_PATH))) else: - results.append(("searches.yaml", warn_mark, "Will use example config — run 'applypilot init'")) + results.append(("searches.yaml", warn_mark, "Will use example config - run 'applypilot init'")) # jobspy (discovery dep installed separately) try: @@ -442,13 +442,13 @@ def doctor() -> None: # Tier summary from applypilot.config import get_tier, TIER_LABELS tier = get_tier() - console.print(f"[bold]Current tier: Tier {tier} — {TIER_LABELS[tier]}[/bold]") + console.print(f"[bold]Current tier: Tier {tier} - {TIER_LABELS[tier]}[/bold]") if tier == 1: - console.print("[dim] → Tier 2 unlocks: scoring, tailoring, cover letters (needs LLM API key)[/dim]") - console.print("[dim] → Tier 3 unlocks: auto-apply (needs Claude Code CLI + Chrome + Node.js)[/dim]") + console.print("[dim] -> Tier 2 unlocks: scoring, tailoring, cover letters (needs LLM API key)[/dim]") + console.print("[dim] -> Tier 3 unlocks: auto-apply (needs Claude Code CLI + Chrome + Node.js)[/dim]") elif tier == 2: - console.print("[dim] → Tier 3 unlocks: auto-apply (needs Claude Code CLI + Chrome + Node.js)[/dim]") + console.print("[dim] -> Tier 3 unlocks: auto-apply (needs Claude Code CLI + Chrome + Node.js)[/dim]") console.print()