Platform
Windows 10 native (Git Bash, Python 3.13.5)
Problem
drone @seedgo --help (and likely any command using Rich formatting with Unicode characters) crashes on Windows with:
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-41: character maps to <undefined>
File "rich\_win32_console.py", line 402, in write_text
File "encodings\cp1252.py", line 19, in encode
Windows terminals default to code page cp1252 (Windows-1252). Rich falls back to its legacy Windows renderer which tries to encode output as cp1252. Characters commonly used in AIPass output — em dashes (—), box-drawing chars (┌─┐│└┘), arrows (→), etc. — are not in cp1252 and cause a crash.
Reproduction
Fresh Windows 10 clone, after setup:
drone @seedgo --help # crashes with UnicodeEncodeError
drone systems # likely affected too
drone @flow list open # likely affected too
Any drone command that triggers Rich-formatted output will fail on a default Windows terminal.
Fix
Set PYTHONUTF8=1 — forces Python to use UTF-8 for all I/O regardless of locale:
PYTHONUTF8=1 drone @seedgo --help # works
Where to apply
setup.sh — set PYTHONUTF8=1 before running the verification checks and as a default env var for Windows users
~/.claude/settings.json env block — so Claude Code sessions inherit it
- Windows PATH instructions — tell users to add
PYTHONUTF8=1 to their environment permanently (System Properties > Environment Variables)
Suggested setup.sh addition (Windows block):
if [ "$IS_WINDOWS" -eq 1 ]; then
export PYTHONUTF8=1
echo " Set PYTHONUTF8=1 (required for Rich Unicode output on Windows)"
fi
Suggested ~/.claude/settings.json env block addition:
"env": {
"PYTHONUTF8": "1"
}
Context
Discovered during Windows 10 fresh-clone setup test (issue #294 series).
Platform
Windows 10 native (Git Bash, Python 3.13.5)
Problem
drone @seedgo --help(and likely any command using Rich formatting with Unicode characters) crashes on Windows with:Windows terminals default to code page
cp1252(Windows-1252). Rich falls back to its legacy Windows renderer which tries to encode output ascp1252. Characters commonly used in AIPass output — em dashes (—), box-drawing chars (┌─┐│└┘), arrows (→), etc. — are not incp1252and cause a crash.Reproduction
Fresh Windows 10 clone, after setup:
Any
dronecommand that triggers Rich-formatted output will fail on a default Windows terminal.Fix
Set
PYTHONUTF8=1— forces Python to use UTF-8 for all I/O regardless of locale:PYTHONUTF8=1 drone @seedgo --help # worksWhere to apply
setup.sh— setPYTHONUTF8=1before running the verification checks and as a default env var for Windows users~/.claude/settings.jsonenv block — so Claude Code sessions inherit itPYTHONUTF8=1to their environment permanently (System Properties > Environment Variables)Suggested
setup.shaddition (Windows block):Suggested
~/.claude/settings.jsonenv block addition:Context
Discovered during Windows 10 fresh-clone setup test (issue #294 series).