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

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

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
Error Reporting Timeseries Timezones
Milestone

Comments

@broessli
Copy link

@broessli broessli commented Nov 27, 2014

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 Timeseries Timezones labels Nov 27, 2014
@jreback jreback added this to the 0.16.0 milestone Nov 27, 2014
@jreback jreback removed this from the 0.16.0 milestone Mar 6, 2015
@jreback jreback added this to the Next Major Release milestone Mar 6, 2015
@jreback jreback added this to the Next Major Release milestone Mar 6, 2015
@jreback jreback removed this from the 0.16.0 milestone Mar 6, 2015
@jorisvandenbossche
Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Nov 11, 2016

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 removed this from the Next Major Release milestone Jun 15, 2018
@jreback jreback added this to the 0.23.2 milestone Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Timeseries Timezones
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants