Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch CSV writer to the unix dialect so that newline chars are always quoted #221

Open
rs-sathya opened this issue Aug 31, 2022 · 0 comments

Comments

@rs-sathya
Copy link

rs-sathya commented Aug 31, 2022

We're seeing the following error for some data that's being attempted to be imported: psycopg2.errors.BadCopyFileFormat: unquoted newline found in data

This could be because of newlines in the source stream. I am testing and will verify the below suggested fix.

So far, my proposed solution is to use the unix dialect of CSV writer: https://docs.python.org/3/library/csv.html#csv.unix_dialect

I am working on a short PR and we can resolve this issue once the PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant