Skip to content

ENH issue#11977 Added ValueError to Timestamp p… #12026

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
wants to merge 1 commit into from
Closed

ENH issue#11977 Added ValueError to Timestamp p… #12026

wants to merge 1 commit into from

Conversation

MattRijk
Copy link
Contributor

closes #11977

@MattRijk MattRijk closed this Jan 12, 2016
@jreback
Copy link
Contributor

jreback commented Jan 12, 2016

pls don't keep opening and closing pull requests

simply push to the same one

@MattRijk MattRijk reopened this Jan 12, 2016
@MattRijk MattRijk changed the title ENH issue#11977 Added ValueError(year is out of range) to Timestamp p… ENH issue#11977 Added ValueError to Timestamp p… Jan 12, 2016
@MattRijk
Copy link
Contributor Author

Question. How to I embed a graph in an issue?

@TomAugspurger
Copy link
Contributor

@jreback
Copy link
Contributor

jreback commented Jan 13, 2016

drag and drop

@@ -1360,7 +1360,7 @@ cpdef convert_str_to_tsobject(object ts, object tz, object unit,
try:
ts = parse_datetime_string(ts, dayfirst=dayfirst, yearfirst=yearfirst)
except Exception:
raise ValueError
raise ValueError("year is out of range")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just pass this exception thru.

@jreback
Copy link
Contributor

jreback commented Jan 13, 2016

ideally like some tests that assert_raises_regex about the error message (add in tseries/test_timeseries)

@jreback jreback added Datetime Datetime data dtype Error Reporting Incorrect or improved errors from pandas labels Jan 13, 2016
@jreback
Copy link
Contributor

jreback commented Jan 16, 2016

@MattRijk can you update according to comments

@jreback
Copy link
Contributor

jreback commented Jan 20, 2016

@MattRijk can you update

@jreback
Copy link
Contributor

jreback commented Jan 30, 2016

pls reopen if you'd like to update

@jreback jreback closed this Jan 30, 2016
@MattRijk
Copy link
Contributor Author

@jreback. Sorry for not getting back to you. I worked on the update a couple of times for a while. I couldn't get the message to show correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERR: better error message on invalid timestamp parsing
3 participants