Skip to content

Auto-update from v0.76.2 -> v0.77.0 leaves broken install (ModuleNotFoundError: keboola_agent_cli) #545

Description

@MichalProchazka

While running kbagent (v0.76.2), the CLI's built-in auto-update check kicked in and attempted to upgrade to v0.77.0. The update failed with:

Updating kbagent v0.76.2 -> v0.77.0...
Auto-update failed; continuing with current version. Recover with: uv tool install --force --reinstall "keboola-cli @ https://github.com/keboola/cli/releases/download/v0.77.0/keboola_cli-0.77.0-py3-none-any.whl"
Error in sys.excepthook:
Traceback (most recent call last):
  File "typer/main.py", line 82, in except_hook
ImportError: cannot import name 'rich_utils' from 'typer'

Despite the message saying it would "continue with current version," the local install was left in a broken, inconsistent state -- every subsequent command (kbagent flow --help, kbagent job --help, etc.) failed immediately with:

ModuleNotFoundError: No module named 'keboola_agent_cli'

so the tool was completely unusable until manually repaired.

Environment: Windows 11, installed via uv tool install.

Workaround: running the exact recovery command printed in the failed-update message fixed it:

uv tool install --force --reinstall "keboola-cli @ https://github.com/keboola/cli/releases/download/v0.77.0/keboola_cli-0.77.0-py3-none-any.whl"

After that, kbagent --version correctly reports v0.77.0 and kbagent doctor passes.

Suggested fix: if auto-update fails partway (e.g. dependency conflict, partial package removal), the CLI should roll back to the previously-working install rather than leaving a half-updated environment that can't even print --help.

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