Skip to content

fix: charmap error - #104

Open
Filip-Dymczyk wants to merge 2 commits into
intercreate:mainfrom
Filip-Dymczyk:work/charmap_error_fix
Open

fix: charmap error#104
Filip-Dymczyk wants to merge 2 commits into
intercreate:mainfrom
Filip-Dymczyk:work/charmap_error_fix

Conversation

@Filip-Dymczyk

Copy link
Copy Markdown

Context
When trying to wrap the downloaded .exe in Python, I had an issue: Transport error: connection timeout - common.py:142 UnicodeEncodeError: 'charmap' codec can't encode character '\\u2826' in position\n0: character maps to <undefined>\n[PYI-27128:ERROR] Failed to execute script '__main__' due to unhandled exception!\n").

Changes

  • forcing the Rich terminal rendering when stdout is actually attached to a terminal.

@JPHutchins

JPHutchins commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

I like this, makes sense that Rich would have thought of this.

Related to: #91

FYI, smpmgr is not really meant to be wrapped, since it is a user-facing CLI app. I highly recommend writing your own app with smpclient at the point you need reliability, performance, customization, etc.

https://rich.readthedocs.io/en/stable/reference/console.html#rich.console.Console

Please run the linters locally, rebase, and squash.

. ./envr.ps1
lint

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates CLI progress spinners to avoid Windows charmap encoding failures.

Changes:

  • Uses an ASCII-compatible spinner.
  • Forces terminal rendering only when stdout is a terminal.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread smpmgr/common.py
@@ -1,12 +1,14 @@
"""Common CLI helpers from rich, typer, click, etc."""

import sys
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.

3 participants