isoparse fails when using get_artists
I'm using the current code (git clone) Here is my short code :
from funkwhale_api_client.models import get_artists_ordering_item
from funkwhale_api_client.models.get_artists_ordering_item import GetArtistsOrderingItem
from funkwhale_api_client.models.paginated_artist_with_albums_list import PaginatedArtistWithAlbumsList
from funkwhale_api_client.api.artists import get_artists
from funkwhale_api_client.types import Response
f_api_client = AuthenticatedClient(base_url="<redacted>", token="<redacted>")
def get_artist_list():
response: Response[GetArtistsOrderingItem] = get_artists.sync(client=f_api_client)
print(response)
get_artist_list()
The error :
Traceback (most recent call last):
File "/home/jvj/Documents/Programmation/funk_tags/main.py", line 73, in <module>
get_artist_list()
File "/home/jvj/Documents/Programmation/funk_tags/main.py", line 69, in get_artist_list
response: Response[GetArtistsOrderingItem] = get_artists.sync(client=f_api_client)
File "/home/jvj/Documents/Programmation/api-client-python/funkwhale_api_client/api/artists/get_artists.py", line 248, in sync
return sync_detailed(
File "/home/jvj/Documents/Programmation/api-client-python/funkwhale_api_client/api/artists/get_artists.py", line 196, in sync_detailed
r = _build_response(response=response)
File "/home/jvj/Documents/Programmation/api-client-python/funkwhale_api_client/api/artists/get_artists.py", line 118, in _build_response
parsed=_parse_response(response=response),
File "/home/jvj/Documents/Programmation/api-client-python/funkwhale_api_client/api/artists/get_artists.py", line 107, in _parse_response
response_200 = PaginatedArtistWithAlbumsList.from_dict(response.json())
File "/home/jvj/Documents/Programmation/api-client-python/funkwhale_api_client/models/paginated_artist_with_albums_list.py", line 65, in from_dict
results_item = ArtistWithAlbums.from_dict(results_item_data)
File "/home/jvj/Documents/Programmation/api-client-python/funkwhale_api_client/models/artist_with_albums.py", line 102, in from_dict
albums_item = ArtistAlbum.from_dict(albums_item_data)
File "/home/jvj/Documents/Programmation/api-client-python/funkwhale_api_client/models/artist_album.py", line 95, in from_dict
release_date = isoparse(d.pop("release_date")).date()
File "/home/jvj/Documents/Programmation/funk_tags/venv/lib/python3.9/site-packages/dateutil/parser/isoparser.py", line 37, in func
return f(self, str_in, *args, **kwargs)
File "/home/jvj/Documents/Programmation/funk_tags/venv/lib/python3.9/site-packages/dateutil/parser/isoparser.py", line 134, in isoparse
components, pos = self._parse_isodate(dt_str)
File "/home/jvj/Documents/Programmation/funk_tags/venv/lib/python3.9/site-packages/dateutil/parser/isoparser.py", line 208, in _parse_isodate
return self._parse_isodate_common(dt_str)
File "/home/jvj/Documents/Programmation/funk_tags/venv/lib/python3.9/site-packages/dateutil/parser/isoparser.py", line 213, in _parse_isodate_common
len_str = len(dt_str)
TypeError: object of type 'NoneType' has no len()
I printed the dict of the last album that tried to be parsed :
{'cover': None, 'tracks_count': 1, 'is_playable': True, 'is_local': True, 'id': 1668, 'fid': 'https://<redacted>federation/music/albums/c672a1f3-ea7a-4be2-ae11-cb3704cc2bbb', 'mbid': None, 'title': '[Unknown Album]', 'artist': 926, 'release_date': None, 'creation_date': '2022-12-14T15:12:56.093337Z'}
Note that release_date is 'None'