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

import_from_csv doesn't respect CSV default fmtparams overwriting #208

Open
berinhard opened this issue Oct 24, 2016 · 0 comments · May be fixed by #209
Open

import_from_csv doesn't respect CSV default fmtparams overwriting #208

berinhard opened this issue Oct 24, 2016 · 0 comments · May be fixed by #209
Assignees
Milestone

Comments

@berinhard
Copy link
Contributor

Currently, I'm using rows to import a CSV file like this:

LAST NAME, FIRST NAME;LANGUAGE;Address 1;Address 2;RATE;Mobile;Home;Fax;email
Fontes, Bernardo;Portuguese, English;0, Rua dos Bobos;São Paulo, RJ 0101010;$10;1234-4321;1234-4321;1234-4321;[email protected]

But is acceptable to accept an entry only with the name and email values like the following:

LAST NAME, FIRST NAME;LANGUAGE;Address 1;Address 2;RATE;Mobile;Home;Fax;email
Fontes, Bernardo, Ali;;;;;;;;[email protected]

When trying to import this CSV, the lib gets confused and stops use the ; as delimiter and starts to use ,. So, it would be nice to have a way to overwrite the delimiter parameter to be passed to csv.reader here.

I know that I can do that by passing a custom Dialect object within the dialect parameter, but, in my opinion, this is less straightforward than following Python API.

@berinhard berinhard linked a pull request Oct 24, 2016 that will close this issue
@turicas turicas added this to the Version 0.4.0 milestone Sep 13, 2017
@turicas turicas modified the milestones: Version 0.4.0, Version 0.5.0 Dec 1, 2018
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

Successfully merging a pull request may close this issue.

2 participants