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

Skip to content

Commit 81696fd

Browse files
committed
Catch correct parse errror type for dateutil >= 2.8.1
1 parent 70fb1a6 commit 81696fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)