# str.format/% errors: IndexError: Replacement index 1 out of range for positional args tuple; not enough arguments for format string (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/str-format-errors-indexerror-replacement-index-1-out-of-range-for-positional-args-tuple-not-enough-b524e9e5356a
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: python, format, errors

'{}{}'.format(1); '{a}'.format(b=1) -> KeyError: 'a'; '{'.format(1) -> "Single '{' encountered in format string"; '%s'%(1,2) -> 'not all arguments converted during string formatting'; '%d'%'a' -> '%d format: a real number is required, not str'.
