`print(project)` fails for specific cases
For some reason the Project.data
of my TestProject reads
'displayName': 'TestProject',
'startDate': '2020-09-24T06:46:58.497',
'endDate': '2020-10-31T07:46:00',
which results in the following error if a print is attempted:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [17], line 1
----> 1 pr.startDate
File /mnt/c/Users/Siemer/pyiron_git/other_git_repos/coscine-api-python-client/src/coscine/project.py:187, in Project.startDate(self)
185 @property
186 def startDate(self) -> datetime:
--> 187 return datetime.strptime(self.data["startDate"], TIMEFORMAT)
File ~/anaconda3/envs/pyiron/lib/python3.8/_strptime.py:568, in _strptime_datetime(cls, data_string, format)
565 def _strptime_datetime(cls, data_string, format="%a %b %d %H:%M:%S %Y"):
566 """Return a class cls instance based on the input string and the
567 format string."""
--> 568 tt, fraction, gmtoff_fraction = _strptime(data_string, format)
569 tzname, gmtoff = tt[-2:]
570 args = tt[:6] + (fraction,)
File ~/anaconda3/envs/pyiron/lib/python3.8/_strptime.py:352, in _strptime(data_string, format)
349 raise ValueError("time data %r does not match format %r" %
350 (data_string, format))
351 if len(data_string) != found.end():
--> 352 raise ValueError("unconverted data remains: %s" %
353 data_string[found.end():])
355 iso_year = year = None
356 month = day = 1
ValueError: unconverted data remains: .497