Skip to content

Commit

Permalink
Refactor file reading in AgilentRDLReader to specify UTF-8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
haeussma committed Oct 25, 2024
1 parent 1c7f0c1 commit 87b6fc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chromatopy/readers/agilent_rdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def read(self):

@staticmethod
def read_file(file_path: str) -> list[str]:
with open(file_path, "r") as file:
with open(file_path, "r", encoding="utf-8") as file:
lines = file.readlines()

return lines
Expand Down
2 changes: 1 addition & 1 deletion chromatopy/tools/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def read_agilent(
found_lines = "found no startswith ┌─────"
except UnicodeDecodeError:
error = "UnicodeDecodeError"
txt_paths = txt_paths

except StopIteration:
error = "StopIteration"
txt_paths = txt_paths
Expand Down

0 comments on commit 87b6fc0

Please sign in to comment.