Skip to content

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

Description

@timenick

Bug

Several command files under src/winml/modelkit/commands/ crash on Windows with UnicodeEncodeError when printing non-ASCII characters (, , ). The default cp1252 encoding on Windows cannot encode these characters.

UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' in position 1: character maps to <undefined>

Root Cause

PR #200 (commit 92325bf) fixed the same class of bug in analyze and inspect, but missed the following files:

  • optimize.py and in comments and console.print()
  • build.py in comment
  • config.py in string literal (runtime crash)
  • eval.py in comment
  • live_chart.py and in comments
  • perf.py and in comments

Fix

Replace with ->, with --, and with * in all affected files, matching the approach in PR #200.

Environment

  • Windows 11, Python 3.10.9, cp1252 console encoding

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions