diff --git a/trestle/tasks/csv_to_oscal_cd.py b/trestle/tasks/csv_to_oscal_cd.py index a1da00bde..358dece29 100644 --- a/trestle/tasks/csv_to_oscal_cd.py +++ b/trestle/tasks/csv_to_oscal_cd.py @@ -1576,14 +1576,10 @@ class _CsvMgr(): def __init__(self, csv_path: pathlib.Path) -> None: """Initialize.""" self._csv = [] - with open(csv_path, 'r', newline='') as f: + with open(csv_path, 'r', newline='', encoding='utf8') as f: csv_reader = csv.reader(f, delimiter=',', quoting=csv.QUOTE_MINIMAL) - row = None - try: - for row in csv_reader: - self._csv.append(row) - except Exception: - raise RuntimeError(f'row: {row}') + for row in csv_reader: + self._csv.append(row) self._undecorate_header() self._verify() self._csv_rules_map = {}