Skip to content

Windows: concore CLI crashes with UnicodeEncodeError when output is redirected #644

Open

Description

@Siddhanthguptaa

On Windows, when the output of any concore command is redirected or piped (scripts, CI logs, | findstr), Python writes stdout with the legacy code page (cp1252) and the CLI crashes on the first check mark:

> concore init demo > out.txt
UnicodeEncodeError: 'charmap' codec can't encode character '✓' in position 0: character maps to <undefined>

Exit code is 1. In an interactive console it works because rich writes through the console API.

The same happens on any OS with PYTHONIOENCODING=cp1252, which makes it easy to reproduce:
PYTHONIOENCODING=cp1252 python -c "from concore_cli.cli import cli; cli()" init demo > out.txt

I have a small fix with a test and will open a PR against dev.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions