-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recognize_song raises FileNotFoundError even if file is present #9
Comments
@SetUpSim, Hello! I have a question for you: I already have a project that you want to implement: An asynchronous library for working with telegram is used here (aiogram). |
A piece of Telebot documentation:
So I'm sending a naked request to Telegram API to download files because |
@SetUpSim, |
@dotX12 Your code still raises FileNotFoundError for me. |
Check if your files are saved? |
@SetUpSim, Ahhh, sorry man...
You need to install ffmpeg. |
Yep, that was the thing. Thank you |
I'm writing a Teleram bot with Shazam-like functionality. Under the hood it downloads the file or voice message sent by user, gets its path and tries to recognize the song from file located on that path.
My code:
Unfortunately, recognize_song(file_path) method raises FileNotFoundError even if file is present, which is logged by
print(os.path.exists(path))
Console log:
I haven't used the
loop = asyncio.get_event_loop() loop.run_until_complete(main())
construct from the example because it raisesRuntimeError: There is no current event loop in thread 'WorkerThread2'
The text was updated successfully, but these errors were encountered: