Skip to content

Commit

Permalink
Merge pull request #453 from jpmckinney/null-character-filter2
Browse files Browse the repository at this point in the history
fix: Ignore null characters in the input CSV file when getting non-header rows
  • Loading branch information
Bjwebb authored Aug 7, 2024
2 parents 4d1c5ed + 086be3f commit 537d72e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed

- Ignore null characters in the input CSV file when getting non-header rows

### Changed

- Use custom warnings and exceptions [#450](https://github.com/OpenDataServices/flatten-tool/issues/450) [#451](https://github.com/OpenDataServices/flatten-tool/issues/451)
Expand Down Expand Up @@ -35,7 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed

- Ignore null characters in the input CSV file
- Ignore null characters in the input CSV file when getting header rows
https://github.com/OpenDataServices/flatten-tool/pull/435

## [0.24.0] - 2023-11-15
Expand Down
2 changes: 1 addition & 1 deletion flattentool/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ def get_sheet_lines(self, sheet_name):
with open(
os.path.join(self.input_name, sheet_name + ".csv"), encoding=self.encoding
) as main_sheet_file:
dictreader = DictReader(main_sheet_file)
dictreader = DictReader(NullCharacterFilter(main_sheet_file))
for row in self.generate_rows(dictreader, sheet_name):
yield row

Expand Down

0 comments on commit 537d72e

Please sign in to comment.