InGen is a command line tool written on top of pandas and great_expectations to perform small scale data transformations and validations without writing code.
Apache License 2.0
14
stars
5
forks
source link
Trailing new lines in config.properties file crashes the application #7
Describe the bug
InGen reads a property file which contains key value pairs separated by an equal to (=) sign. The class properties.py (ingen/utils/properties.py) is responsible for reading the file from a location which is defined by the OS environment variable config_path. If the file contains a new line the code crashes with following error:
File ".../interface-generator/ingen/utils/properties.py", line 35, in initialize_properties
self.property_map[list_property[0]] = list_property[1]
IndexError: list index out of range
To Reproduce
Steps to reproduce the behavior:
Set environment variable config_path to any location
Create a config.properties file in that location
Add an empty line at the end or anywhere in the file
An IndexError is thrown because the code is trying to parse an empty line
Expected behavior
Any empty lines should be ignored.
Environment (please complete the following information):
Describe the bug InGen reads a property file which contains key value pairs separated by an equal to (=) sign. The class properties.py (ingen/utils/properties.py) is responsible for reading the file from a location which is defined by the OS environment variable config_path. If the file contains a new line the code crashes with following error:
To Reproduce Steps to reproduce the behavior:
config_path
to any locationconfig.properties
file in that locationExpected behavior Any empty lines should be ignored.
Environment (please complete the following information):
Additional context related issue #6