Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

AttributeError on init command due to missing rich_utils in Typer #98

Description

@swssl

When running nuanced init . in a repository, I get the following exception:

Traceback (most recent call last):
  File "/home/user/.local/bin/nuanced", line 4, in <module>
    from nuanced import cli
  File "/home/user/.local/share/uv/tools/nuanced/lib/python3.13/site-packages/nuanced/cli.py", line 12, in <module>
    typer.rich_utils.STYLE_NEGATIVE_SWITCH = "bold indian_red"
    ^^^^^^^^^^^^^^^^
AttributeError: module 'typer' has no attribute 'rich_utils'

This is due to Typer switching to dynamically importing rich as described in fastapi/typer#1285 . They suggest to fix it by importing typer.rich_utils explicitly which also works here.

Version info:

OS: Ubuntu 24.04.3 LTS x86_64 (WSL 2.6.1.0)
Shell: zsh 5.9

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions