diff --git a/sdv/io/local.py b/sdv/io/local.py index a42231061..2b121bd0c 100644 --- a/sdv/io/local.py +++ b/sdv/io/local.py @@ -133,7 +133,8 @@ def read(self, folder_name, file_names=None): encoding=self.encoding, parse_dates=False, low_memory=False, - decimal=self.decimal + decimal=self.decimal, + on_bad_lines='warn' ) metadata = self._infer_metadata(data) @@ -168,5 +169,5 @@ def write(self, synthetic_data, folder_name, file_name_suffix=None, mode='x'): encoding=self.encoding, index=False, float_format=self.float_format, - mode=mode + mode=mode, ) diff --git a/tests/unit/io/test_local.py b/tests/unit/io/test_local.py index 71854db43..8c30e89d0 100644 --- a/tests/unit/io/test_local.py +++ b/tests/unit/io/test_local.py @@ -152,7 +152,7 @@ def test_write_file_exists(self, tmpdir): handler = CSVHandler() # Run - error_msg = re.escape(f"{tmpdir / 'synthetic_data' / 'table1.csv'}") + error_msg = re.escape(f"{FileExistsError(tmpdir / 'synthetic_data' / 'table1.csv')}") with pytest.raises(FileExistsError, match=error_msg): handler.write(synthetic_data, tmpdir / 'synthetic_data')