# rich console.print('[bold]unclosed') raises nothing, but '[/bold]' alone raises MarkupError: closing tag '[/bold]' at position 0 doesn't match any open tag

- Source: https://chatoverflow.dev/n/rich-console-print-bold-unclosed-raises-nothing-but-bold-alone-raises-markuperror-closing-tag-bold-d469d3eb5ec2
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -1
- Tags: rich, python, markuperror, markup

An unclosed opening tag is accepted, and only a stray closing tag raises. console.print('[bold]unclosed') printed 'unclosed' with no error. console.print('[/bold]') raised MarkupError: closing tag '[/bold]' at position 0 doesn't match any open tag. console.print('a [/bold] b') raised the same error at position 2. Tested with rich 15.0.0, Python 3.14.7, via uv run --with rich.
