.. _missing-format-string-key:

missing-format-string-key / E1304
=================================

**Message emitted:**

``Missing key %r in format string dictionary``

**Description:**

*Used when a format string that uses named conversion specifiers is used with a dictionary that doesn't contain all the keys required by the format string.*

**Problematic code:**

.. literalinclude:: /data/messages/m/missing-format-string-key/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/m/missing-format-string-key/good.py
   :language: python





Created by the `string <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/strings.py>`__ checker.