Skip to content

Corrupt colored output #1862

Description

@kayoub5

Describe the bug

A clear and concise description of what the bug is.
I don't know why, but in Windows pyinfra logs are always corrupted

Image

To Reproduce

Steps to reproduce the behavior, please include where possible:

pyinfra inventory.py exec hostname

Adding --serial does not help, corruption is there regardless of operation being done, or machine being connected to, using

pyinfra inventory.py exec hostname > discard.log

causes the corruption to disappear, but the colors are gone as well.

  • Operation code & usage: Microsoft Windows [Version 10.0.26200.8655]
  • Target system information: Any

Meta

  • Include output of pyinfra --support.
    System: Windows
      Platform: Windows-11-10.0.26200-SP0
      Release: 11
      Machine: AMD64
    pyinfra: v3.9.2
      click: v8.4.2
      distro: v1.9.0
      gevent: v25.9.1
      jinja2: v3.1.6
      packaging: v24.2
      paramiko: v3.5.1
      pydantic: v2.12.5
      python-dateutil: v2.9.0.post0
      typeguard: v4.4.4
      types-paramiko: v4.0.0.20260508
      typing-extensions: v4.15.0
    Executable: C:\Users\akaanich\Workspace\RnD\setup-runner\.venv\Scripts\pyinfra
    Python: 3.13.3 (CPython, MSC v.1943 64 bit (AMD64))
```
+ How was pyinfra installed (source/pip)? `uv`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugLabel for all kind of bugs.connectorsConnector issues - builtin integrations with other tools.operationsIssues with operations.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions