Skip to content

Commit 1d988c0

Browse files
jbrockmendelproost
authored andcommitted
CLN: catch stricter in json (pandas-dev#28351)
1 parent 922798a commit 1d988c0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/io/json/_json.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -970,10 +970,8 @@ def _try_convert_to_date(self, data):
970970
for date_unit in date_units:
971971
try:
972972
new_data = to_datetime(new_data, errors="raise", unit=date_unit)
973-
except ValueError:
973+
except (ValueError, OverflowError):
974974
continue
975-
except Exception:
976-
break
977975
return new_data, True
978976
return data, False
979977

0 commit comments

Comments
 (0)