Skip to content

ERR: csv parsing error consistency of exceptions #12665

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

Closed
jreback opened this issue Mar 18, 2016 · 10 comments · Fixed by #14479
Closed

ERR: csv parsing error consistency of exceptions #12665

jreback opened this issue Mar 18, 2016 · 10 comments · Fixed by #14479
Labels
Error Reporting Incorrect or improved errors from pandas IO CSV read_csv, to_csv
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Mar 18, 2016

xref #12551

a) change CParserError to an actual ValueError. this is used in a very small number of cases in the engine='c' parser. (in #12551 it will inherit from ValueError)

b) So we either change ALL ValueError to ParserError(ValueError) (e.g. a custom exception) and make the changes in both the engine='c' and engine='python'.

@jreback jreback added Error Reporting Incorrect or improved errors from pandas IO CSV read_csv, to_csv labels Mar 18, 2016
@jreback jreback added this to the 0.19.0 milestone Mar 18, 2016
@jreback
Copy link
Contributor Author

jreback commented Mar 18, 2016

cc @gfyoung @jorisvandenbossche

thoughts?

@gfyoung
Copy link
Member

gfyoung commented Mar 18, 2016

xref #12506 as well

Hmmm...from a semantic point of view, I would prefer ParserError over the more generic ValueError. However, it does seem like converting everything to ParserError is going to break a lot more things compared to ValueError I'd imagine.

@gfyoung
Copy link
Member

gfyoung commented Apr 17, 2016

@jreback : Does the merged #12506 handle this issue satisfactorily?

@jreback
Copy link
Contributor Author

jreback commented Apr 17, 2016

yes, ty.

closed by #12506

@jreback jreback closed this as completed Apr 17, 2016
@jreback jreback reopened this Apr 17, 2016
@jreback
Copy link
Contributor Author

jreback commented Apr 17, 2016

actually. What I eventually wanted was to make ALL parser exceptions the same, which is an API change.

@gfyoung
Copy link
Member

gfyoung commented Apr 17, 2016

By which you mean across both the CParser and the PythonParser or that they just always raise one exception whenever there is an error in the reading?

@jreback
Copy link
Contributor Author

jreback commented Apr 17, 2016

yes I think we need to have a single ParserException (which is just a ValueError). (and remove the CParserException moniker, that's why its an API change.

@gfyoung
Copy link
Member

gfyoung commented Apr 17, 2016

Okay, that makes sense. Just wanted to clarify!

gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 23, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 23, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 23, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 24, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 24, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 24, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 24, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 25, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 25, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 26, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 26, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 27, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 27, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 27, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 28, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 30, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Oct 31, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 1, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 2, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 3, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 4, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 5, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.

[ci skip]
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 8, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.

[ci skip]
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 8, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 9, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 9, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 10, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.

[ci skip]
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 10, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.

[ci skip]
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 11, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.

[ci skip]
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 12, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.

[ci skip]
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 13, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.

[ci skip]
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 13, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 13, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 13, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 14, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 15, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 16, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 17, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
gfyoung added a commit to forking-repos/pandas that referenced this issue Nov 18, 2016
Partially resolves pandas-devgh-12665. We will remove
CParserError in the future.
jorisvandenbossche pushed a commit that referenced this issue Nov 18, 2016
Partially resolves gh-12665. We will remove
CParserError in the future.
@jorisvandenbossche
Copy link
Member

@gfyoung You said this is only partially resolved by the merged PR?

@gfyoung
Copy link
Member

gfyoung commented Nov 18, 2016

@jorisvandenbossche : Hmm...not sure why I said that. Should just be resolves. Oh well. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants