fix: Windows crash on startup — missing UTF-8 encoding for history.jsonl#5
Closed
ashleyleslie1 wants to merge 1 commit into
Closed
fix: Windows crash on startup — missing UTF-8 encoding for history.jsonl#5ashleyleslie1 wants to merge 1 commit into
ashleyleslie1 wants to merge 1 commit into
Conversation
On Windows, Python defaults to the system encoding (cp1252) when opening files without an explicit encoding parameter. Since Claude Code writes history.jsonl as UTF-8, this causes a UnicodeDecodeError on startup: UnicodeEncodeError: 'charmap' codec can't encode characters This matches the encoding pattern already used throughout the rest of server.py for JSONL file reads.
ashleyleslie1
added a commit
to ashleyleslie1/CCDash
that referenced
this pull request
Apr 5, 2026
…n re-renders - Force UTF-8 stdout/stderr at startup for Windows compatibility - Include open(HISTORY_FILE) encoding fix from PR zihenghe04#5 - Add tooltip theme to all ApexCharts instances (fixes white-on-white in dark mode) - Re-render report, git stats, MCP stats, tools on language toggle - Translate hardcoded 'msgs' and '/day' strings
Contributor
Author
|
Fix also included in PR 6, so will close this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
open(HISTORY_FILE)on line 4527 crashes on Windows withUnicodeDecodeErrorbecause Python defaults tocp1252instead of UTF-8encoding='utf-8', errors='replace'to match the pattern already used throughout the rest ofserver.pySteps to reproduce
python server.pyUnicodeEncodeError: 'charmap' codec can't encode characters in position 2-5Fix
One-line change — consistent with how all other
open()calls inserver.pyalready handle JSONL files.Test plan
/api/overviewreturns correct data after fix