Ошибка Command raised an exception: DownloadError: ERROR: Unable to extract uploader id; В чем проблема и как решить?

Столкнулся с проблемой, при написании бота для discord на языке Python 3.10 . Пoявляется вот такая вот ошибка:

Command raised an exception: DownloadError: ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Вот сам код:

import urllib.request
from youtube_dl import YoutubeDL
from asyncio import sleep
import discord
import ffmpeg
from discord.ext import commands
import youtube_dl


YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist':'False'}
FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
ffmpeg_options = {
    'options': '-vn'
}
config = {
    'token': 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
    'prefix': '!',
}


@bot.command()
async def play(ctx, arg):
      global vc
      voice_channel = ctx.message.author.voice.channel
      vc = await voice_channel.connect()
      if vc.is_playing():
          await ctx.send(f'{ctx.message.author.mention}, музыка уже проигрывается.')
      else:
        with YoutubeDL(YDL_OPTIONS) as ydl:
            info = ydl.extract_info(arg, download=False)
        URL = info['formats'][0]['url']
        vc.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source = URL, **FFMPEG_OPTIONS))
        while vc.is_playing():
            await sleep(1)
        if not vc.is_paused():
            await vc.disconnect()

bot.run(config['token'])

Данный код должен воспроизводить видео из youtube прямо в дискорде, но к сожалению, получается ошибка выше. И да, возможно, вам покажется, что некоторые библиотеки выше лишние, но дело в том, что код неполный :D Дорогие форумчане, хотелось бы выслушать ваше мнение по этому поводу, а еще, хотелось бы узнать, как решать эту проблему. За ранее спасибо


Ответы (0 шт):