From a9cfb18968af803e39de215f74fbdfb0f9f298b9 Mon Sep 17 00:00:00 2001 From: Cristian Pufu Date: Fri, 27 Feb 2026 06:10:04 +0200 Subject: [PATCH] fix: reconfigure stdout/stderr to UTF-8 on Windows to prevent charmap encoding errors --- pyproject.toml | 2 +- src/uipath/_cli/__init__.py | 7 +++++++ uv.lock | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5487727d5..cb4ee4b9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath" -version = "2.9.14" +version = "2.9.15" description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools." readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/src/uipath/_cli/__init__.py b/src/uipath/_cli/__init__.py index 9b33a450c..1c5ae464a 100644 --- a/src/uipath/_cli/__init__.py +++ b/src/uipath/_cli/__init__.py @@ -9,6 +9,13 @@ from uipath._utils._logs import setup_logging from uipath._utils.constants import DOTENV_FILE +# Windows console uses codepages (e.g. cp1252) that can't encode Unicode +# characters used by Rich spinners (Braille) and emoji output. +if sys.platform == "win32": + for _stream in (sys.stdout, sys.stderr): + if hasattr(_stream, "reconfigure"): + _stream.reconfigure(encoding="utf-8") + # DO NOT ADD HEAVY IMPORTS HERE # # Every import at the top of this file runs on EVERY command. diff --git a/uv.lock b/uv.lock index 827bb27dd..e341d3500 100644 --- a/uv.lock +++ b/uv.lock @@ -2531,7 +2531,7 @@ wheels = [ [[package]] name = "uipath" -version = "2.9.14" +version = "2.9.15" source = { editable = "." } dependencies = [ { name = "applicationinsights" },