'NoneType' object has no attribute 'weekday'