Error fetching materialization meta data
schlegelp opened this issue · 1 comments
schlegelp commented
Looks like one of the materialization versions does not have an expiry date which then causes troubles in CAVEclient?
>>> client.materialize.get_versions_metadata()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [31], in <module>
----> 1 client.materialize.get_versions_metadata()
File ~/.pyenv/versions/3.9.9/lib/python3.9/site-packages/cachetools/__init__.py:520, in cached.<locals>.decorator.<locals>.wrapper(*args, **kwargs)
518 except KeyError:
519 pass # key not found
--> 520 v = func(*args, **kwargs)
521 try:
522 cache[k] = v
File ~/.pyenv/versions/3.9.9/lib/python3.9/site-packages/caveclient/materializationengine.py:363, in MaterializatonClientV2.get_versions_metadata(self, datastack_name)
361 for md in d:
362 md["time_stamp"] = convert_timestamp(md["time_stamp"])
--> 363 md["expires_on"] = convert_timestamp(md["expires_on"])
364 return d
File ~/.pyenv/versions/3.9.9/lib/python3.9/site-packages/caveclient/materializationengine.py:78, in convert_timestamp(ts)
76 elif isinstance(ts, float):
77 return datetime.fromtimestamp(ts)
---> 78 dt = datetime.strptime(ts, "%Y-%m-%dT%H:%M:%S.%f")
79 return dt.replace(tzinfo=timezone.utc)
TypeError: strptime() argument 1 must be str, not None
This is with 4.11.0