Skip to content

Error Question (Serialize) #123

@EvaBruh

Description

@EvaBruh

Hi.
Everything was working, but at some point on queries on variations of TOPs where i use Serialize.playlist or playlists, started to cause a serialization error, what could be the issue?

# print check 1 not printing

top_w = top_world_genres(self.shazam, genre)
        for track in top_w['data']:
            try:
                serialize_w = Serialize.playlist(data=track)
                print(f'check 1  {serialize_w}')
                have = self.check_track(serialize_w.attributes.artist_name, serialize_w.attributes.name, chart)
                track_info = {
                    "artist": serialize_w.attributes.artist_name,
                    "tname": serialize_w.attributes.name,
                    "have_track": have
                }
                top_list.append(track_info)

            except Exception as e:
                print(str(e), 'error Shazam')
                continue

and error for each track in top_w in Exception print:
1 validation error for PlayList
attributes -> hasCredits
field required (type=value_error.missing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions