ValueError: unconverted data remains: .post

I am trying to fetch data using mp_api, but suddenly I am facing this issue. I think it is some data time parser error. Please let me know if I can fix it from my side or is this some API error. Here is the error log:

—> 16 with MPRester(mp_api_key) as mpr:
17 data_12 = mpr.materials.summary.search(elements=[“P”, “O”], exclude_elements=[“H”], fields=query_properties)
19 flattened = [{
20 k: v
21 for k, v in flatten(doc.dict(), reducer=“dot”).items()
22 if k != “fields_not_requested”
23 } for doc in data_12]

File ~/miniconda3/envs/python-env/lib/python3.12/site-packages/mp_api/client/mprester.py:258, in MPRester.init(self, api_key, endpoint, notify_db_version, include_user_agent, monty_decode, use_document_model, session, headers, mute_progress_bars)
254 # Instantiate top level molecules and materials resters and set them as attributes
255 core_suffix = [“molecules/core”, “materials/core”]
257 core_resters = {
→ 258 cls.suffix.split(“/”)[0]: cls(
259 api_key=api_key,
260 endpoint=endpoint,
261 include_user_agent=include_user_agent,
262 session=self.session,
263 monty_decode=monty_decode,
264 use_document_model=use_document_model,
265 headers=self.headers,
266 mute_progress_bars=self.mute_progress_bars,
267 )
268 for cls in self._all_resters
269 if cls.suffix in core_suffix
270 }
272 # Set remaining top level resters, or get an attribute-class name mapping
273 # for all sub-resters
274 _sub_rester_suffix_map = {“materials”: {}, “molecules”: {}}

File ~/miniconda3/envs/python-env/lib/python3.12/site-packages/mp_api/client/core/client.py:122, in BaseRester.init(self, api_key, endpoint, include_user_agent, session, s3_client, debug, monty_decode, use_document_model, timeout, headers, mute_progress_bars)
120 self.headers = headers or {}
121 self.mute_progress_bars = mute_progress_bars
→ 122 self.db_version = BaseRester._get_database_version(self.endpoint)
124 if self.suffix:
125 self.endpoint = urljoin(self.endpoint, self.suffix)

File ~/miniconda3/envs/python-env/lib/python3.12/site-packages/mp_api/client/core/client.py:226, in BaseRester._get_database_version(endpoint)
224 date_str = requests.get(url=endpoint + “heartbeat”).json()[“db_version”]
225 # Convert the string to a datetime object
→ 226 date_obj = datetime.strptime(date_str, “%Y.%m.%d”)
228 # Format the datetime object as a string
229 formatted_date = date_obj.strftime(“%Y.%m.%d”)

File ~/miniconda3/envs/python-env/lib/python3.12/_strptime.py:554, in _strptime_datetime(cls, data_string, format)
551 def _strptime_datetime(cls, data_string, format=“%a %b %d %H:%M:%S %Y”):
552 “”“Return a class cls instance based on the input string and the
553 format string.”“”
→ 554 tt, fraction, gmtoff_fraction = _strptime(data_string, format)
555 tzname, gmtoff = tt[-2:]
556 args = tt[:6] + (fraction,)

File ~/miniconda3/envs/python-env/lib/python3.12/_strptime.py:336, in _strptime(data_string, format)
333 raise ValueError("time data %r does not match format r"
334 (data_string, format))
335 if len(data_string) != found.end():
→ 336 raise ValueError("unconverted data remains: s"
337 data_string[found.end():])
339 iso_year = year = None
340 month = day = 1

ValueError: unconverted data remains: .post

Please search the forum for existing threads and solutions first: