mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-70835: Clarify error message for CSV file opened with wrong newline (GH-113786)
Based on patch by SilentGhost.
This commit is contained in:
parent
aef4a1203c
commit
568d220993
2 changed files with 14 additions and 8 deletions
|
@ -837,7 +837,8 @@ parse_process_char(ReaderObj *self, _csvstate *module_state, Py_UCS4 c)
|
|||
self->state = START_RECORD;
|
||||
else {
|
||||
PyErr_Format(module_state->error_obj,
|
||||
"new-line character seen in unquoted field - do you need to open the file in universal-newline mode?");
|
||||
"new-line character seen in unquoted field - "
|
||||
"do you need to open the file with newline=''?");
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue