GeezerVison is showing github.com — cannot import name 'MarkupMode' from 'typer.rich_utils' · Issue #332 · unioslo/zabbix-cli
cannot import name 'MarkupMode' from 'typer.rich_utils' #332Descriptionhello, I have a new issue with the installation of zabbix 7.0 with Yunohost related from a user case
here logs he found (Debian 12)
2025-12-31 10:54:45,194: DEBUG - + /usr/share/zabbix-cli/bin/zabbix-cli --config /usr/share/zabbix-cli/zabbix-cli.toml create_user svc_zabbix_ldap --firstname svc_zabbix_ldap --lastname svc_zabbix_ldap --passwd ********** --role superadmin --groups 7
2025-12-31 10:54:45,607: WARNING - ╭───────────────────── Traceback (most recent call last) ────────────────────��─╮
2025-12-31 10:54:45,608: WARNING - │ /usr/share/zabbix-cli/lib/python3.11/site-packages/zabbix_cli/_patches/typer │
2025-12-31 10:54:45,610: WARNING - │ .py:316 in patch │
2025-12-31 10:54:45,610: WARNING - │ │
2025-12-31 10:54:45,612: WARNING - │ 313 │ with patcher("typer.rich_utils.STYLE_HELPTEXT"): │
2025-12-31 10:54:45,613: WARNING - │ 314 │ │ patch_help_text_style() │
2025-12-31 10:54:45,614: WARNING - │ 315 │ with patcher("typer.rich_utils._get_help_text"): │
2025-12-31 10:54:45,615: WARNING - │ ❱ 316 │ │ patch_help_text_spacing() │
2025-12-31 10:54:45,616: WARNING - │ 317 │ with patcher("typer.main.generate_enum_convertor"): │
2025-12-31 10:54:45,616: WARNING - │ 318 │ │ patch_generate_enum_convertor() │
2025-12-31 10:54:45,618: WARNING - │ 319 │ with patcher("typer.main.get_click_type"): │
2025-12-31 10:54:45,618: WARNING - │ │
2025-12-31 10:54:45,620: WARNING - │ /usr/share/zabbix-cli/lib/python3.11/site-packages/zabbix_cli/_patches/typer │
2025-12-31 10:54:45,620: WARNING - │ .py:60 in patch_help_text_spacing │
2025-12-31 10:54:45,622: WARNING - │ │
2025-12-31 10:54:45,622: WARNING - │ 57 │ from typer.rich_utils import STYLE_DEPRECATED │
2025-12-31 10:54:45,623: WARNING - │ 58 │ from typer.rich_utils import STYLE_HELPTEXT │
2025-12-31 10:54:45,624: WARNING - │ 59 │ from typer.rich_utils import STYLE_HELPTEXT_FIRST_LINE │
2025-12-31 10:54:45,625: WARNING - │ ❱ 60 │ from typer.rich_utils import MarkupMode │
2025-12-31 10:54:45,626: WARNING - │ 61 │ from typer.rich_utils import _make_rich_text │
2025-12-31 10:54:45,627: WARNING - │ 62 │ │
2025-12-31 10:54:45,627: WARNING - │ 63 │ @group() │
2025-12-31 10:54:45,629: WARNING - ╰──────────────────────────────────────────────────────────────────────────────╯
2025-12-31 10:54:45,629: WARNING - ImportError: cannot import name 'MarkupMode' from 'typer.rich_utils'
2025-12-31 10:54:45,631: WARNING - (/usr/share/zabbix-cli/lib/python3.11/site-packages/typer/rich_utils.py)
2025-12-31 10:54:45,632: DEBUG -
2025-12-31 10:54:45,633: WARNING - Diagnostics
2025-12-31 10:54:45,634: WARNING - ┌─────────────┬───────────────────────────────────────────────────┐
2025-12-31 10:54:45,635: WARNING - │ Package │ Typer version: 0.21.0 │
2025-12-31 10:54:45,636: WARNING - │ zabbix-cli │ 3.6.2 │
2025-12-31 10:54:45,637: WARNING - │ Python │ 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] │
2025-12-31 10:54:45,638: WARNING - │ Platform │ linux │
2025-12-31 10:54:45,639: WARNING - └─────────────┴───────────────────────────────────────────────────┘
2025-12-31 10:54:45,639: WARNING - ERROR: Failed to patch typer.rich_utils._get_help_text
Activityavesst commented on Jan 14, 2026 I have the same problem. Any ideas how to fix? rodinux commented on Jan 20, 2026 ContributorAuthor More actions I found a fix, not sure is the good way. It seems since 0.20.1, Typer have replace MarkupMode with MarkupModeStrict. I made a PR if you want try it... rodinux commented on Jan 21, 2026 ContributorAuthor More actions I am not an expert with python coding, but my PR works to fix zabbix-cli-uio install. In the install process for the zabbix Yunohost package, I am using this and it works...
mkdir -p /usr/share/zabbix-cli
python3 -m venv /usr/share/zabbix-cli
/usr/share/zabbix-cli/bin/pip install git+https://github.com/rodinux/zabbix-cli@fix-MarkupMode
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|