Skip to main content
On Windows, PraisonAI automatically reconfigures sys.stdout / sys.stderr of the Typer process to UTF-8 before any command runs, and falls back to ASCII glyphs for any output path that still needs it β€” Rich-heavy commands like praisonai browser doctor work without $env:PYTHONIOENCODING='utf-8'.
The user sends Unicode text; PraisonAI renders safely without crashing legacy Windows consoles.

Detection Flow

Two-Layer Mitigation

Every Typer command passes through two layers on Windows, so Unicode output never crashes the CLI.

What Runs on Every Typer Invocation

_ensure_utf8_stdio() behaviour:

Quick Start

1

Automatic Handling

PraisonAI reconfigures stdout/stderr to UTF-8 on Windows and renders Unicode output without crashes:
No configuration needed β€” no PYTHONIOENCODING workaround required.
2

Legacy Workaround (Older Releases)

Releases older than PraisonAI PR #5857 only set PYTHONIOENCODING for child processes. On those versions, enable UTF-8 manually (or run pip install --upgrade praisonai):

How It Works


Configuration Options

The automatic encoding detection requires no configuration. However, you can override behavior:
Lazily-loaded subcommands must honour the same contract. praisonai --help walks the whole command tree, including subcommands lazily registered from optional packages (praisonai-bot’s claw, praisonai-mcp’s mcp-server, etc.). A Typer help= string from any optional package that contains a non-cp1252 character crashes praisonai --help on Windows the moment that package is installed β€” while CI (which does not install the optional package) stays green. See CLI Help Panels, PraisonAI PR #2699 for the original policy, and PR #4997 for the claw-help regression that motivated re-stating it. Rich runtime banners (dashboard splash, ASCII art) are separate β€” they run through the encoding-aware writer and may include emoji.

Common Patterns

Problem: UnicodeEncodeError in Older Versions

Symptom:
Solution:

Pattern: Permanent UTF-8 Setup

For PowerShell users:
For CMD users:

Pattern: Windows Terminal Integration

Use Windows Terminal instead of legacy CMD:

Pattern: Training summary on cp1252

praisonai-train agents handles cp1252/ASCII automatically β€” the summary table swaps emoji for ASCII (PASSED / *) and falls back to plain-text rows if Rich itself can’t encode. See praisonai-train Package β†’ Windows & non-UTF-8 Consoles for the full flow.

Best Practices

Windows Terminal provides full UTF-8 support and modern terminal features. Download from the Microsoft Store or install via winget install Microsoft.WindowsTerminal.
Instead of setting PYTHONIOENCODING in each session, add it to your system environment variables through System Properties β†’ Environment Variables.
Windows Subsystem for Linux (WSL) provides a full Unix terminal experience without encoding issues. Install with wsl --install.
praisonai browser doctor runs on default PowerShell / cmd with no env-var workaround. If you still see Error: Unable to display help due to terminal encoding limitations., your release pre-dates PR #5857 β€” upgrade with pip install --upgrade praisonai.
The automatic encoding detection was added in recent versions. Ensure you’re running the latest version with pip install --upgrade praisonai.

CLI Reference

Complete CLI command reference

Installation Guide

Getting started with PraisonAI

praisonai-train Package

ASCII-safe training summaries on non-UTF-8 consoles.