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

Skip to content

Commit b2b2d14

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

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
@@ -179,7 +179,8 @@ def _str_is_convertible(val):
179179
except ValueError:
180180
try:
181181
dateutil.parser.parse(val)
182-
except ValueError:
182+
except (ValueError, TypeError):
183+
# TypeError if dateutil >= 2.8.1 else ValueError
183184
return False
184185
return True
185186

0 commit comments

Comments
 (0)