You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When encountering a date greater than year 9999 (which is the maximum year for a date in Python), a ValueError is raised and no results are returned.
While these dates seem obvious typos to me, we could investigate whether it would be possible to ignore these values in pydov (set them to empty) and raise a warning. This would enable users to retrieve the other data in the request, which is currently not possible.
Traceback (most recent call last):
File "/home/roel/Sideprojects/pydov/example_vergunning.py", line 8, in <module>
df = s.search(query=PropertyIsEqualTo('pkey_installatie',
File "/home/roel/Sideprojects/pydov/pydov/search/abstract.py", line 962, in search
data=self._type.to_df_array(
File "/home/roel/Sideprojects/pydov/pydov/types/abstract.py", line 618, in to_df_array
for item in iterable:
File "/home/roel/Sideprojects/pydov/pydov/types/abstract.py", line 435, in from_wfs
yield (cls.from_wfs_element(feature, namespace))
File "/home/roel/Sideprojects/pydov/pydov/types/abstract.py", line 387, in from_wfs_element
instance.data[field['name']] = cls._parse(
File "/home/roel/Sideprojects/pydov/pydov/types/abstract.py", line 69, in _parse
return cls._typeconvert(text, returntype)
File "/home/roel/Sideprojects/pydov/pydov/search/abstract.py", line 115, in _typeconvert
return typeconvert(text)
File "/home/roel/Sideprojects/pydov/pydov/search/abstract.py", line 98, in typeconvert
return datetime.datetime.strptime(x, '%Y-%m-%d').date()
File "/usr/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/lib/python3.10/_strptime.py", line 349, in _strptime
raise ValueError("time data %r does not match format %r" %
ValueError: time data '20202-11-26' does not match format '%Y-%m-%d'
The text was updated successfully, but these errors were encountered:
Description
When encountering a date greater than year 9999 (which is the maximum year for a date in Python), a ValueError is raised and no results are returned.
While these dates seem obvious typos to me, we could investigate whether it would be possible to ignore these values in pydov (set them to empty) and raise a warning. This would enable users to retrieve the other data in the request, which is currently not possible.
What I Did
The text was updated successfully, but these errors were encountered: