Just-Some-Bots / MusicBot

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

Crash with youtube-dl (review 1.9.7) #1490

Closed wellivea1 closed 6 years ago

wellivea1 commented 6 years ago

Description of issue

Musicbot throws a download error then crashes (still recognizes people coming in, but will not play anything.

Steps to reproduce

  1. Not really sure, it seems that deleting all the cached lists temporarily fixes it.

Log file

musicbot.log

Munzy commented 6 years ago

Try ~disconnect and then ~summon.

MattBSG commented 6 years ago

You marked that you are not running 1.9.6_2, please update your bot and dependencies by running update_dependencies.bat and seeing https://just-some-bots.github.io/MusicBot/#guidesupdating

Munzy commented 6 years ago

I'm having these issues on 1.9.6_2. Just as an FYI.

[INFO] launcher: Starting sanity checks
[INFO] launcher: Checking for Python 3.5+
[INFO] launcher: Checking console encoding
[INFO] launcher: Ensuring we're in the right environment
[INFO] launcher: Required checks passed.
[INFO] launcher: Optional checks passed.
[INFO] launcher: Moving old musicbot log
^[]2;MusicBot 1.9.6_2^G^[[37m=========== MusicBot (version 1.9.6_2) ===========^[[0m
^[[33mWARNING: Failed to get entry, retrying
Traceback (most recent call last):
  File "/home/huginn/MusicBot/musicbot/entry.py", line 224, in _really_download
    result = await self.playlist.downloader.extract_info(self.playlist.loop, self.url, download=True)
  File "/home/huginn/MusicBot/musicbot/downloader.py", line 86, 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/huginn/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 795, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/home/huginn/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 849, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/home/huginn/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1622, in process_video_result
    self.process_info(new_info)
  File "/home/huginn/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1895, in process_info
    success = dl(filename, info_dict)
  File "/home/huginn/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1834, in dl
    return fd.download(name, info)
  File "/home/huginn/.local/lib/python3.5/site-packages/youtube_dl/downloader/common.py", line 361, in download
    return self.real_download(filename, info_dict)
  File "/home/huginn/.local/lib/python3.5/site-packages/youtube_dl/downloader/http.py", line 296, in real_download
    self.report_error('giving up after %s retries' % retries)
  File "/home/huginn/.local/lib/python3.5/site-packages/youtube_dl/downloader/common.py", line 163, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/home/huginn/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 612, in report_error
    self.trouble(error_message, tb)
  File "/home/huginn/.local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 582, in trouble
    raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: giving up after 100 retries

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/huginn/MusicBot/musicbot/player.py", line 249, in _play
    entry = await self.playlist.get_next_entry()
  File "/home/huginn/MusicBot/musicbot/playlist.py", line 315, in get_next_entry
    return await entry.get_ready_future()
  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 "/home/huginn/MusicBot/musicbot/entry.py", line 205, in _download
    await self._really_download()
  File "/home/huginn/MusicBot/musicbot/entry.py", line 227, in _really_download
    raise ExtractionError(e)
musicbot.exceptions.ExtractionError: ERROR: giving up after 100 retries^[[0m
^[[37m190519000805933058/мυηzү#xxxx has joined Black Voodoo/PoF Maps^[[0m
wellivea1 commented 6 years ago

I am not using the main branch, so I can't "update" to 1.9.6_2. It's still happening to me sometimes and it stops playing my autoplaylist when it happens (in one channel) but it will still play a song manually. https://pastebin.com/78cZ3F6x

Munzy commented 6 years ago

If you aren't using the main branch then how do you expect them to fix your issue?

Create a copy of your audio_cache and config folder. Delete the bot entirely, and then place your config and audio_cache folders back.

Take a read over the newer options and permissions examples and make sure everything is set properly in your real config files.

If you are running any other version it won't be supported.

wellivea1 commented 6 years ago

Well, I don't know where else to report issues for the review branch.

MattBSG commented 6 years ago

Review branch will be merged soon™. If you could please use master 1.9.6_3 and edit your options in again and then report back it might be of more help. Issues from the review branch are certainly welcome but I need to identify if it is an issue introduced into review, or already in master

Munzy commented 6 years ago

Does this fix the bot stalling on certain songs?

jayktaylor commented 6 years ago

I removed the retry code in the review branch. Update (git pull) and then see if it helps.

wellivea1 commented 6 years ago

I just pulled the latest review version, we'll see. I'll try switching to master soon™.

[DEBUG:bot] Serializing queue for 246586817283883008 [mov,mp4,m4a,3gp,3g2,mj2 @ 0000019fdfe79620] stream 0, timescale not set [mjpeg @ 0000019fdfe7c2a0] mjpeg: error decoding EXIF data

Also, this is odd.

MattBSG commented 6 years ago

I don't think you need to worry about that, you have debug logging on. Should be fine

wellivea1 commented 6 years ago

That issue doesn't seem to be happening anymore.

MattBSG commented 6 years ago

Awesome, I’ll go ahead and close this then. Feel free to reopen if not fixed or happens again