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?
Tag: configparser
Airflow issue with pathlib / configparser – ‘PosixPath’ object is not iterable
I am trying to containerize my airflow setup. I’ve been tasked to keep the environment the same, just move it into a docker container. We currently have Airflow and all our dependencies installed within a anaconda environment. So what I’ve done is created a custom docker image that installs anaconda and creates my environment. The problem is, our current environment
Don’t understand this ConfigParser.InterpolationSyntaxError
So I have tried to write a small config file for my script, which should specify an IP address, a port and a URL which should be created via interpolation using the former two variables. My config.ini looks like this: In my script I parse this config file as follows: If I run my script, this results in: I have