Skip to content

Commit b629038

Browse files
jbrockmendelproost
authored andcommitted
troubleshoot CI (pandas-dev#29294)
1 parent 6b31015 commit b629038

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pandas/io/parsers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2929,7 +2929,7 @@ def _next_iter_line(self, row_num):
29292929
if self.warn_bad_lines or self.error_bad_lines:
29302930
msg = str(e)
29312931

2932-
if "NULL byte" in msg:
2932+
if "NULL byte" in msg or "line contains NUL" in msg:
29332933
msg = (
29342934
"NULL byte detected. This byte "
29352935
"cannot be processed in Python's "

pandas/tests/io/parser/test_common.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1915,10 +1915,7 @@ def test_null_byte_char(all_parsers):
19151915
out = parser.read_csv(StringIO(data), names=names)
19161916
tm.assert_frame_equal(out, expected)
19171917
else:
1918-
if compat.PY38:
1919-
msg = "line contains NUL"
1920-
else:
1921-
msg = "NULL byte detected"
1918+
msg = "NULL byte detected"
19221919
with pytest.raises(ParserError, match=msg):
19231920
parser.read_csv(StringIO(data), names=names)
19241921

0 commit comments

Comments
 (0)