This error occurs when the CSV file uses different newlines than the OS default. While Python has universal newlines support (open(..., mode='rU')). We are passed a file that is already open. Thus we need to split the lines in a way that supports all newline methods.
This error occurs when the CSV file uses different newlines than the OS default. While Python has universal newlines support (
open(..., mode='rU')
). We are passed a file that is already open. Thus we need to split the lines in a way that supports all newline methods.https://sentry00.dev.veristack.com/veristack/ncaa/issues/258/
.splitlines()
is more robust than.readlines()
, so that may be an option to use rather than reopening the file.