Skip to content

fix windows UnicodeEncodeError after render completes#189

Merged
NejcS merged 1 commit into
mainfrom
fix/windows-stdout-encoding
May 21, 2026
Merged

fix windows UnicodeEncodeError after render completes#189
NejcS merged 1 commit into
mainfrom
fix/windows-stdout-encoding

Conversation

@NejcS

@NejcS NejcS commented May 19, 2026

Copy link
Copy Markdown
Contributor

The "✓ rendering completed" console output throws an error on Windows because of different encoding.

The error: UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 42: character maps to <undefined>

@NejcS NejcS requested a review from zanjonke May 19, 2026 07:10
@NejcS NejcS self-assigned this May 19, 2026
@NejcS NejcS marked this pull request as ready for review May 19, 2026 07:10
@NejcS NejcS marked this pull request as draft May 19, 2026 07:12
@NejcS

NejcS commented May 19, 2026

Copy link
Copy Markdown
Contributor Author

Ahh... this doesn't fix the issue. Changing to draft.

@NejcS

NejcS commented May 19, 2026

Copy link
Copy Markdown
Contributor Author

The new change is much simpler. Using console.print instead of info avoids the logger which means there's no encoding issues (not sure about what's going on under the hood but whatever ...).

I tested this branch on my AWS Workspaces Windows machine.

@NejcS NejcS marked this pull request as ready for review May 19, 2026 07:41
@pedjaradenkovic

Copy link
Copy Markdown
Contributor

This doesn't feel like te real fix.

The problem with encoding will still exists and can wait for us on the next corner.

Have you tried this?

Set the environment variable so all Python processes use UTF-8:
set PYTHONUTF8=1

@NejcS

NejcS commented May 19, 2026

Copy link
Copy Markdown
Contributor Author

@pedjaradenkovic I tried it out but it doesn't fix the issue.

I'll dig into this and find a better solution.

@NejcS NejcS requested review from pedjaradenkovic and removed request for zanjonke May 19, 2026 12:22
@NejcS

NejcS commented May 19, 2026

Copy link
Copy Markdown
Contributor Author

This works now and I think it's a better solution. I kept the console.info => console.print change because the info log level doesn't make sense in that case anyway.

@pedjaradenkovic pedjaradenkovic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

@NejcS NejcS force-pushed the fix/windows-stdout-encoding branch from 75a01f6 to 573f8e3 Compare May 21, 2026 05:42
@NejcS NejcS merged commit d9c0b54 into main May 21, 2026
10 checks passed
@NejcS NejcS deleted the fix/windows-stdout-encoding branch May 21, 2026 05:45
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.

2 participants