Musicbot: playing youtube video error

Created on 31 Jan 2017  路  4Comments  路  Source: Just-Some-Bots/MusicBot

Whenever someone requests a video like this: https://youtu.be/SLsTskih7_I or https://youtu.be/SC4xMk98Pdc (playing a video like https://youtu.be/6m0eyex4WtA works completely fine)

I get the following error:

ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 1057, in _decrypt_signature
video_id, player_url, s
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 971, in _extract_signature_function
errnote='Download of %s failed' % player_url)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 529, in _download_webpage
res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 436, in _download_webpage_handle
urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 416, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 2000, in urlopen
req = sanitized_Request(req)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\utils.py", line 525, in sanitized_Request
return compat_urllib_request.Request(sanitize_url(url), args, *kwargs)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 268, in __init__
self.full_url = url
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 294, in full_url
self._parse()
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 323, in _parse
raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'
(caused by ValueError("unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'",))
: ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 1057, in _decrypt_signature
video_id, player_url, s
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 971, in _extract_signature_function
errnote='Download of %s failed' % player_url)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 529, in _download_webpage
res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 436, in _download_webpage_handle
urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 416, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 2000, in urlopen
req = sanitized_Request(req)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\utils.py", line 525, in sanitized_Request
return compat_urllib_request.Request(sanitize_url(url), args, *kwargs)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 268, in __init__
self.full_url = url
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 294, in full_url
self._parse()
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 323, in _parse
raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'
(caused by ValueError("unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'",))
Traceback (most recent call last):
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 1057, in _decrypt_signature
video_id, player_url, s
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 971, in _extract_signature_function
errnote='Download of %s failed' % player_url)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 529, in _download_webpage
res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 436, in _download_webpage_handle
urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 416, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 2000, in urlopen
req = sanitized_Request(req)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\utils.py", line 525, in sanitized_Request
return compat_urllib_request.Request(sanitize_url(url), args, *kwargs)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 268, in __init__
self.full_url = url
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 294, in full_url
self._parse()
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 323, in _parse
raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 694, in extract_info
ie_result = ie.extract(url)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 369, in extract
return self._real_extract(url)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 1646, in _real_extract
encrypted_sig, video_id, player_url, age_gate)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 1067, in _decrypt_signature
'Signature extraction failed: ' + tb, cause=e)
youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 1057, in _decrypt_signature
video_id, player_url, s
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 971, in _extract_signature_function
errnote='Download of %s failed' % player_url)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 529, in _download_webpage
res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 436, in _download_webpage_handle
urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 416, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 2000, in urlopen
req = sanitized_Request(req)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\utils.py", line 525, in sanitized_Request
return compat_urllib_request.Request(sanitize_url(url), args, *kwargs)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 268, in __init__
self.full_url = url
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 294, in full_url
self._parse()
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 323, in _parse
raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'
(caused by ValueError("unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'",))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\isaac\MusicBot\musicbot\bot.py", line 868, in cmd_play
info = await self.downloader.extract_info(player.playlist.loop, song_url, download=False, process=False)
File "C:\Users\isaac\MusicBot\musicbot\downloader.py", line 82, in extract_info
return await loop.run_in_executor(self.thread_pool, functools.partial(self.unsafe_ytdl.extract_info, args, *kwargs))
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py", line 358, in __iter__
yield self # This tells Task to wait for completion.
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\asyncio\tasks.py", line 290, in _wakeup
future.result()
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py", line 274, in result
raise self._exception
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\concurrent\futures\thread.py", line 55, in run
result = self.fn(self.args, *self.kwargs)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 709, in extract_info
self.report_error(compat_str(e), e.format_traceback())
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 568, in report_error
self.trouble(error_message, tb)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 538, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 1057, in _decrypt_signature
video_id, player_url, s
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 971, in _extract_signature_function
errnote='Download of %s failed' % player_url)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 529, in _download_webpage
res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 436, in _download_webpage_handle
urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 416, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 2000, in urlopen
req = sanitized_Request(req)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\utils.py", line 525, in sanitized_Request
return compat_urllib_request.Request(sanitize_url(url), args, *kwargs)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 268, in __init__
self.full_url = url
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 294, in full_url
self._parse()
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 323, in _parse
raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'
(caused by ValueError("unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'",))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\isaac\MusicBot\musicbot\bot.py", line 1931, in on_message
response = await handler(*handler_kwargs)
File "C:\Users\isaac\MusicBot\musicbot\bot.py", line 870, in cmd_play
raise exceptions.CommandError(e, expire_in=30)
musicbot.exceptions.CommandError: ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 1057, in _decrypt_signature
video_id, player_url, s
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\youtube.py", line 971, in _extract_signature_function
errnote='Download of %s failed' % player_url)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 529, in _download_webpage
res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 436, in _download_webpage_handle
urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dlextractor\common.py", line 416, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 2000, in urlopen
req = sanitized_Request(req)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\youtube_dl\utils.py", line 525, in sanitized_Request
return compat_urllib_request.Request(sanitize_url(url), *args, *
kwargs)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 268, in __init__
self.full_url = url
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 294, in full_url
self._parse()
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 323, in _parse
raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'
(caused by ValueError("unknown url type: '/yts/jsbin/player-en_US-vflV3n15C/base.js'",))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\client.py", line 275, in _run_event
yield from getattr(self, event)(args, *kwargs)
File "C:\Users\isaac\MusicBot\musicbot\bot.py", line 1953, in on_message
also_delete=alsodelete
File "C:\Users\isaac\MusicBot\musicbot\bot.py", line 473, in safe_send_message
msg = await self.send_message(dest, content, tts=tts)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\client.py", line 831, in send_message
data = yield from self.http.send_message(channel_id, content, guild_id=guild_id, tts=tts)
File "C:\Users\isaac\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\http.py", line 137, in request
raise HTTPException(r, data)
discord.errors.HTTPException: BAD REQUEST (status code: 400)

dupe

Most helpful comment

Per ImThePeach "This is a known bug on YTDL's end ... We will let you know when to update_deps for the fix."

If you're impatient like me, you can just go to wherever youtube_dl lives (mine is at /usr/local/lib/python3.5/site-packages/youtube_dl/extractor) and replace youtube.py with this hotfix or just edit the three lines yourself.

Thanks to Khang-NT for figuring it out so quickly.

All 4 comments

Also experiencing this. Just started happening a bit ago.

Per ImThePeach "This is a known bug on YTDL's end ... We will let you know when to update_deps for the fix."

If you're impatient like me, you can just go to wherever youtube_dl lives (mine is at /usr/local/lib/python3.5/site-packages/youtube_dl/extractor) and replace youtube.py with this hotfix or just edit the three lines yourself.

Thanks to Khang-NT for figuring it out so quickly.

@michaelfischler I'm very new to how to fix bots or edit them, where would I go to edit this in python.

873

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FireFrostLike picture FireFrostLike  路  4Comments

riggers-logan-1229 picture riggers-logan-1229  路  6Comments

neeleythere picture neeleythere  路  3Comments

SylveonBottle picture SylveonBottle  路  5Comments

depthbomb picture depthbomb  路  4Comments