From 0d50f230224aa97303cf340a6d7694d431527711 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Wed, 26 Jun 2024 11:12:08 -0400 Subject: [PATCH] fix: Apply null character filter on configuration sheet --- CHANGELOG.md | 7 +++++++ flattentool/input.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b0ab3b..86f002f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.24.3] + +### Fixed + +- Ignore null characters in the input CSV file when reading configuration from the header rows + https://github.com/OpenDataServices/flatten-tool/pull/446 + ## [0.24.2] - 2024-06-12 ### Fixed diff --git a/flattentool/input.py b/flattentool/input.py index 8aacdce..524b4c2 100644 --- a/flattentool/input.py +++ b/flattentool/input.py @@ -677,7 +677,7 @@ def get_sheet_configuration(self, sheet_name): with open( os.path.join(self.input_name, sheet_name + ".csv"), encoding=self.encoding ) as main_sheet_file: - r = csvreader(main_sheet_file) + r = csvreader(NullCharacterFilter(main_sheet_file)) heading_row = next(r) if len(heading_row) > 0 and heading_row[0] == "#": return heading_row[1:]