Skip to content

Commit ce7a8a1

Browse files
authored
fix: reconfigure stdout/stderr to UTF-8 on Windows to prevent charmap encoding errors (#1385)
1 parent 4876079 commit ce7a8a1

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath"
3-
version = "2.9.14"
3+
version = "2.9.15"
44
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath/_cli/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
from uipath._utils._logs import setup_logging
1010
from uipath._utils.constants import DOTENV_FILE
1111

12+
# Windows console uses codepages (e.g. cp1252) that can't encode Unicode
13+
# characters used by Rich spinners (Braille) and emoji output.
14+
if sys.platform == "win32":
15+
for _stream in (sys.stdout, sys.stderr):
16+
if hasattr(_stream, "reconfigure"):
17+
_stream.reconfigure(encoding="utf-8")
18+
1219
# DO NOT ADD HEAVY IMPORTS HERE
1320
#
1421
# Every import at the top of this file runs on EVERY command.

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)