Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5d25e96

Browse files
story645MeeseeksDev[bot]
authored andcommitted
Backport PR #15729: Catch correct parse errror type for dateutil >= 2.8.1
1 parent af3c71e commit 5d25e96

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/category.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ def _str_is_convertible(val):
191191
except ValueError:
192192
try:
193193
dateutil.parser.parse(val)
194-
except ValueError:
194+
except (ValueError, TypeError):
195+
# TypeError if dateutil >= 2.8.1 else ValueError
195196
return False
196197
return True
197198

0 commit comments

Comments
 (0)