<#1058 fix: fall back to ASCII spinner when stdout...
# flyte-github
a
#1058 fix: fall back to ASCII spinner when stdout can't encode unicode Pull request opened by EngHabu Summary • Rich's default "dots" spinner uses braille pattern characters (e.g.
'⠙'
). On legacy Windows consoles where
sys.stdout.encoding
is cp1252, writing those characters crashes the CLI with
UnicodeEncodeError
mid-render — Sentry has observed this taking down
flyte deploy
before any real work happens. • Add a
safe_spinner()
helper in
flyte.cli._common
that probes
sys.stdout.encoding
and falls back to Rich's ASCII-only
\"line\"
spinner when the requested spinner's characters can't be encoded. Apply it in
cli_status
and at the direct
console.status(...)
callsites that explicitly request
\"dots\"
. Sentry issues Fixes FLYTE-SDK-A (
UnicodeEncodeError: 'charmap' codec can't encode character '⠙'
) Test plan • New
tests/flyte/cli/test_safe_spinner.py
covers utf-8 (keeps "dots"), cp1252 / ascii / missing encoding (falls back to "line") •
make fmt
clean flyteorg/flyte-sdk