shazamio / ShazamIO

🎵 Is a free asynchronous library from reverse engineered Shazam API written in Python 3.8+ with asyncio and aiohttp.
MIT License
490 stars 69 forks source link

InvalidFieldError #21

Closed Dysta closed 2 years ago

Dysta commented 2 years ago

I got an InvalidFieldError when I shazam the audio from these urls:

Full error: InvalidFieldError: Invalid data at path [0, matches]: init() missing 1 required positional argument: 'channel'

Code

shazam = Shazam()
out = await shazam.recognize_song(data=data_path)
result = Serialize.full_track(data=out)
if not result.track:
    return

youtube_data = await shazam.get_youtube_data(link=result.track.youtube_link)
info = Serialize.youtube(youtube_data)

where data_path is a path to the audio file downloaded from the two previous URLs (example path: /tmp/my_app/aze456sd)

Debug

After debug, the error is raised by the line Serialize.full_track(data=out) with out equal to (convert to JSON here) https://gist.github.com/Dysta/6c2620f2b1fef49e479aed14ad996196

dotX12 commented 2 years ago

@Dysta, Hi, thanks for reporting the bug and sorry for the long time reply.

Corrected!

dotX12 commented 2 years ago

@Dysta, https://github.com/dotX12/ShazamIO/releases/tag/0.1.1.1 https://pypi.org/project/shazamio/0.1.1.1/ Released.