Skip to content

fix: resolve charmap codec error in remaining command files on Windows#208

Merged
timenick merged 4 commits into
mainfrom
zhiwang/fix-optimize-charmap-error
Apr 1, 2026
Merged

fix: resolve charmap codec error in remaining command files on Windows#208
timenick merged 4 commits into
mainfrom
zhiwang/fix-optimize-charmap-error

Conversation

@timenick

@timenick timenick commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #207

Replace non-ASCII characters (→, •) with ASCII equivalents (->, *)
in optimize.py to prevent UnicodeEncodeError on Windows cp1252 consoles.
This was missed in #200 which applied the same fix to analyze and inspect.

Closes #207
@timenick timenick requested a review from a team as a code owner April 1, 2026 05:54
@timenick

timenick commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator Author

PR looks good — clean ASCII replacement matching the #200 approach, no remaining non-ASCII in optimize.py.

However, found the same (U+2192) issue in two more files:

  • src/winml/modelkit/commands/build.py:231 in comment
  • src/winml/modelkit/commands/config.py:102 in string literal (will crash at runtime on cp1252)

config.py:102 is a runtime string, so it'll hit the same UnicodeEncodeError. Recommend fixing those here or in a follow-up.

🤖 Generated with Claude Code

timenick added 2 commits April 1, 2026 14:23
…hart, perf commands

Same charmap codec fix as optimize.py but for the other command files
that were missed: build.py, config.py, eval.py, live_chart.py, perf.py.
@timenick timenick changed the title fix: resolve charmap codec error in winml optimize on Windows fix: resolve charmap codec error in remaining command files on Windows Apr 1, 2026
@timenick timenick requested a review from DingmaomaoBJTU April 1, 2026 06:29
@timenick timenick merged commit 903ce0a into main Apr 1, 2026
9 checks passed
@timenick timenick deleted the zhiwang/fix-optimize-charmap-error branch April 1, 2026 06:41
DingmaomaoBJTU added a commit that referenced this pull request Apr 8, 2026
Addresses reviewer feedback on #262. Two runtime output lines used
U+2192 (→) which crashes on Windows cp1252 terminals (same issue as
#214 / #208).
DingmaomaoBJTU added a commit that referenced this pull request Apr 8, 2026
Addresses reviewer feedback on #262. Two runtime output lines used
U+2192 (→) which crashes on Windows cp1252 terminals (same issue as
#214 / #208).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: charmap codec error in remaining command files on Windows

2 participants