On this page
configparser.UnnamedSectionDisabledError
Prev: configparser.SectionProxy | Up: configparser
Rel: configparser.BasicInterpolation, configparser.ConfigParser, configparser.ConverterMapping, configparser.DuplicateOptionError
Ref: docs.python.org โ configparser.UnnamedSectionDisabledError
Tags: #public #python3 #stdlib #configparser
Import
import configparser
from configparser import UnnamedSectionDisabledError
Signature & Overview
configparser.UnnamedSectionDisabledError()
Raised when an attempt to use UNNAMED_SECTION is made with the feature disabled.
Methods & Attributes
UnnamedSectionDisabledError.add_note(self, note, /)โ Add a note to the exceptionUnnamedSectionDisabledError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import configparser
# Python 3.13+: raised when accessing UNNAMED_SECTION without allow_unnamed_section=True
assert hasattr(configparser, "ConfigParser")
Gotchas
- Requires Python 3.13+: Enable with
ConfigParser(allow_unnamed_section=True).
REPL Inspect
from configparser import UnnamedSectionDisabledError
help(UnnamedSectionDisabledError)
Linked from
Related notes
- tuts/python3/stdlib_module/configparser/SectionProxy Linked here; links to this page; shared tags: #configparser, #stdlib
- tuts/python3/stdlib_module/configparser/BasicInterpolation Linked here; shared tags: #configparser, #stdlib
- tuts/python3/stdlib_module/configparser/ConfigParser Linked here; shared tags: #configparser, #stdlib
- tuts/python3/stdlib_module/configparser/ConverterMapping Linked here; shared tags: #configparser, #stdlib
- tuts/python3/stdlib_module/configparser/DuplicateOptionError Linked here; shared tags: #configparser, #stdlib
- tuts/python3/stdlib_module/configparser links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/configparser/DuplicateSectionError shared tags: #configparser, #stdlib
- tuts/python3/stdlib_module/configparser/ExtendedInterpolation shared tags: #configparser, #stdlib
- tuts/python3/stdlib_module/configparser/Interpolation shared tags: #configparser, #stdlib
- tuts/python3/stdlib_module/configparser/InterpolationDepthError shared tags: #configparser, #stdlib