Skip to content

TST/BUG: Improve error handling when parsing iso 8601 strings #8910

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
broessli opened this issue Nov 27, 2014 · 1 comment · Fixed by #21491
Closed

TST/BUG: Improve error handling when parsing iso 8601 strings #8910

broessli opened this issue Nov 27, 2014 · 1 comment · Fixed by #21491
Labels
Datetime Datetime data dtype Error Reporting Incorrect or improved errors from pandas Timezones Timezone data dtype
Milestone

Comments

@broessli
Copy link

xref #8832

Parsing of datetime strings ending with Z0or Z00should raise (this is currently only the case with Z0).
This is due to the fact that the parser in np_datetime_strings.c cannot raise its own errors since in tslib.pyx, function convert_ts_tsobject(), any ValueError is catched and then a fallback external parser (dateutil) is called.

@jreback jreback changed the title Improve error handling when parsing iso 8601 strings TST/BUG: Improve error handling when parsing iso 8601 strings Nov 27, 2014
@jreback jreback added Error Reporting Incorrect or improved errors from pandas Datetime Datetime data dtype Timezones Timezone data dtype labels Nov 27, 2014
@jreback jreback added this to the 0.16.0 milestone Nov 27, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@jorisvandenbossche
Copy link
Member

I currently get a clear error message that the string cannot be converted:

In [16]: pd.Timestamp('2014-11-02 01:00Z')
Out[16]: Timestamp('2014-11-02 01:00:00+0000', tz='UTC')

In [17]: pd.Timestamp('2014-11-02 01:00Z00')
---------------------------------------------------------------------------
...
ValueError: Unable to parse b'2014-11-02 01:00Z00'

During handling of the above exception, another exception occurred:
...
ValueError: Unknown string format

During handling of the above exception, another exception occurred:
...
ValueError: could not convert string to Timestamp

What is the desired improvement in this issue? (possibly that it also has changed since reporting)

@jreback jreback modified the milestones: Next Major Release, 0.23.2 Jun 15, 2018
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 Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants