On this page
  1. configparser.InterpolationMissingOptionError
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

configparser.InterpolationMissingOptionError

Prev: configparser.InterpolationError | Up: configparser | Next: configparser.InterpolationSyntaxError
Rel: configparser.BasicInterpolation, configparser.ConfigParser, configparser.ConverterMapping, configparser.DuplicateOptionError
Ref: docs.python.org โ€” configparser.InterpolationMissingOptionError
Tags: #public #python3 #stdlib #configparser


Import

import configparser
from configparser import InterpolationMissingOptionError

Signature & Overview

configparser.InterpolationMissingOptionError(option, section, rawval, reference)

A string substitution required a setting which was not available.

Methods & Attributes

Usage

import configparser

cp = configparser.ConfigParser()
cp.read_string("[s]\npath = %(missing)s/file\n")
try:
    _ = cp["s"]["path"]
except configparser.InterpolationMissingOptionError:
    assert True

Gotchas

REPL Inspect

from configparser import InterpolationMissingOptionError
help(InterpolationMissingOptionError)

Linked from

Related notes