Skip to content
Advertisement

Tag: configparser

Python Configparser. Whitespace causes AttributeError

I recieve some files with .ini file with them. I have to recieve file names from [FILES] section. Sometimes there is an extra witespace in another section of .ini-file which raises exception in ConfigParser module The example of “bad” ini-file: My code(Python 3.7): I can’t influence on files I recieve so that is there any way to ignore this error?

Advertisement