Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ignore null characters in the input CSV file when getting non-header rows #453

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading