Skip to content

Commit ab5640f

Browse files
author
OlivierLuG
committed
pandas-dev#34131 fix one test failure
1 parent ea9f69c commit ab5640f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/_libs/tslibs/period.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2411,7 +2411,7 @@ class Period(_Period):
24112411
nanosecond = ts.nanosecond
24122412
if nanosecond != 0:
24132413
reso = 'nanosecond'
2414-
except OutOfBoundsDatetime:
2414+
except (ValueError, OutOfBoundsDatetime):
24152415
nanosecond = 0
24162416
if dt is NaT:
24172417
ordinal = NPY_NAT

0 commit comments

Comments
 (0)