Just-Some-Bots / MusicBot

:musical_note: The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)
https://just-some-bots.github.io/MusicBot/
MIT License
3.13k stars 2.35k forks source link

HTTP Error 429: Too Many Requests #1960

Closed RobWaterhouse95 closed 5 years ago

RobWaterhouse95 commented 5 years ago

Which version are you using?

What type of issue are you creating?


Description of issue

I get the following response when requesting any song.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rob/musicBot/musicbot/bot.py", line 1400, in cmd_play
    info = await self.downloader.extract_info(player.playlist.loop, song_url, download=False, process=False)
  File "/home/rob/musicBot/musicbot/downloader.py", line 84, in extract_info
    return await loop.run_in_executor(self.thread_pool, functools.partial(self.unsafe_ytdl.extract_info, *args, **kwargs))
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/rob/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 819, in extract_info
    self.report_error(compat_str(e), e.format_traceback())
  File "/home/rob/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 624, in report_error
    self.trouble(error_message, tb)
  File "/home/rob/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 594, in trouble
    raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Unable to download webpage: HTTP Error 429: Too Many Requests (caused by <HTTPError 429: 'Too Many `Requests'>

Steps to reproduce

  1. Start the bot
  2. Ensure the queue is cleared
  3. Request a song with !play
  4. Observe error

Log file

musicbot.log

srhinos commented 5 years ago

see https://github.com/Just-Some-Bots/MusicBot/issues/1947