The issue here is actually that fromisoformat is not available in Python versions older than 3.7, you can see that clearly stated in the documenation here.
Return a date corresponding to a date_string given in the format YYYY-MM-DD:
>>>
>>> from datetime import date
>>> date.fromisoformat('2019-12-04')
datetime.date(2019, 12, 4)
This is the inverse of date.isoformat(). It only supports the format YYYY-MM-DD.
New in version 3.7.