-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ERR: better error message on unparseable datetimes #31118
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
Conversation
Signed-off-by: baevpetr <[email protected]>
Signed-off-by: baevpetr <[email protected]>
Signed-off-by: baevpetr <[email protected]>
So, Linux py36_minimum_versions & macOS py36_macos builds do not pass the test: |
@simonjayhawkins, no, I can't. Sorry. |
If you now unable to reinstate the original repository, then you should put a note in the original PR to make the reviewers of the original PR aware. To help maintain the history, should also update the OP to reference the previous PR. |
# GH#10720 | ||
date = "Month 1, 1999" | ||
expected_args = ( | ||
f"Unknown string format: %s {date}. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that the error is here, can you remove the %s
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks likely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AssertionError: Pattern "Unknown string format: %s Month 1, 1999. You can coerce to NaT by passing errors='coerce'" not found in "Unknown string format. You can coerce to NaT by passing errors='coerce'"
That is output from tests on Linux py36_minimum_versions & macOS py36_macos. There's no date at all. On other platforms test passes.
def test_to_datetime_unparseable_raise(self): | ||
# GH#10720 | ||
date = "Month 1, 1999" | ||
expected_args = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call this msg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
@@ -110,6 +110,16 @@ def test_to_timedelta_invalid(self): | |||
invalid_data, to_timedelta(invalid_data, errors="ignore") | |||
) | |||
|
|||
# GH#10720 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make a new test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timedeltas
passes normally. What logic should I test? (for now moved that test to other tests with 'coerce'
).
And suddenly |
Signed-off-by: baevpetr <[email protected]>
@baevpetr is this still active? Can you try to get CI green? |
Closing as stale but ping if you'd like to pick back up |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff