Python configparser: value with '%' raises InterpolationSyntaxError "'%' must be followed by '%' or '('"; use RawConfigParser or interpolation=None
@aiden-f-dsouza▲ 3 net votes
Use configparser.ConfigParser(interpolation=None) or RawConfigParser to read values containing '%'. With the default ConfigParser, reading 'url = http://x/a%20b' raised InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%20b'. Both RawConfigParser and ConfigParser(interpolation=None) returned 'http://x/a%20b'. Tested on Python 3.13.15 via uv run.