You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ConfigParser(interpolation=ExtendedInterpolation) fails with strange error:
Traceback (most recent call last):
File "configparser-test.py", line 36, in <module>
print_sections(cp)
File "configparser-test.py", line 21, in print_sections
cp.read_string(__doc__)
File "/usr/lib64/python3.4/configparser.py", line 696, in read_stringself.read_file(sfile, source)
File "/usr/lib64/python3.4/configparser.py", line 691, in read_fileself._read(f, source)
File "/usr/lib64/python3.4/configparser.py", line 1089, in _readself._join_multiline_values()
File "/usr/lib64/python3.4/configparser.py", line 1101, in _join_multiline_values
name, val)
TypeError: before_read() missing 1 required positional argument: 'value'
I think there is some misunderstanding of what default_section is supposed to do, in fact in provides default values for *other* section, as the documentation says, it doesn't mangle section separation.
In case of ExtendedInterpolation, the interpolation argument needs to be instantiated, i.e. the call should be:
ConfigParser(interpolation=ExtendedInterpolation())
Note: the problem here was due to passing ExtendedInterpolation (the class) instead of ExtendedInterpolation() (the object). This is now fixed through BPO-41086.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: