gh-70835: Clarify error message for CSV file opened with wrong newline (GH-113786)

Based on patch by SilentGhost.
This commit is contained in:
Serhiy Storchaka 2024-01-10 14:52:29 +02:00 committed by GitHub
parent aef4a1203c
commit 568d220993
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 8 deletions

View file

@ -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;