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

configparser.NoSectionError

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


Import

import configparser
from configparser import NoSectionError

Signature & Overview

configparser.NoSectionError(section)

Raised when no section matches a requested option.

Methods & Attributes

Usage

import configparser

cp = configparser.ConfigParser()
try:
    cp.get("missing", "k")
except configparser.NoSectionError:
    assert True

Gotchas

REPL Inspect

from configparser import NoSectionError
help(NoSectionError)

Linked from

Related notes