shazamio / ShazamIO

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

FileNotFoundError: [WinError 2] #74

Closed iWanderling closed 1 year ago

iWanderling commented 1 year ago

When I try to recognize a song from a file:

import asyncio
from shazamio import Shazam, Serialize

async def main():
    shazam = Shazam()
    out = await shazam.recognize_song("dora.ogg")
    print(out)

    serialized = Serialize.full_track(out)
    print(serialized)

loop = asyncio.get_event_loop_policy().get_event_loop()
loop.run_until_complete(main())

I get this error:

hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
  FileNotFoundError: [WinError 2] Не удается найти указанный файл

Although the file is in the same directory as the code

How to fix this error?

iWanderling commented 1 year ago

I didn't install ffmpeg, so that was the problem, now it works great, SOLVED