Skip to content

Windows encoding error (cp1252) when report contains Unicode characters #143

@rwangcenozon

Description

@rwangcenozon

Title: UnicodeEncodeError: 'charmap' codec on Windows when generating GRAPH_REPORT.md

Body:

Environment: Windows, Python 3.x, Git Bash or PowerShell

Problem:
All Path(...).write_text(report) calls in the skill omit encoding='utf-8'. On Windows, Python defaults to the system locale codec (cp1252), which cannot encode characters like → that appear in the generated report.

Error:

UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' in position 1403: character maps to
Affected lines in SKILL.md: Steps 4, 5, and any other write_text() call that writes the report.

Fix: Add encoding='utf-8' to every write_text() call:

Before

Path('graphify-out/GRAPH_REPORT.md').write_text(report)

After

Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding='utf-8')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions