Skip to content
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

ERROR: Signature extraction failed, Could not find JS function 'na' #75

Closed
Gametz opened this issue Dec 15, 2021 · 2 comments · Fixed by #76
Closed

ERROR: Signature extraction failed, Could not find JS function 'na' #75

Gametz opened this issue Dec 15, 2021 · 2 comments · Fixed by #76
Assignees

Comments

@Gametz
Copy link

Gametz commented Dec 15, 2021

ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature
func = self._extract_signature_function(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
res = self._parse_sig_js(code)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\jsinterp.py", line 245, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; 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.
(caused by ExtractorError("Could not find JS function 'na'; 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.")); 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.
Ignoring exception in command play:
Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature
func = self._extract_signature_function(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
res = self._parse_sig_js(code)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\jsinterp.py", line 245, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; 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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 806, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 827, in __extract_info
ie_result = ie.extract(url)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract
ie_result = self._real_extract(url)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1622, in _real_extract
signature = self._decrypt_signature(sc['s'][0], video_id, player_url)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1358, in _decrypt_signature
raise ExtractorError(
youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature
func = self._extract_signature_function(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
res = self._parse_sig_js(code)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\jsinterp.py", line 245, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; 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.
(caused by ExtractorError("Could not find JS function 'na'; 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.")); 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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Users\Vllad\Documents\GitHub\Mbot\musicbot\commands\music.py", line 43, in _play_song
song = await audiocontroller.process_song(track)
File "C:\Users\Vllad\Documents\GitHub\Mbot\musicbot\audiocontroller.py", line 131, in process_song
track = self.search_youtube(track)
File "C:\Users\Vllad\Documents\GitHub\Mbot\musicbot\audiocontroller.py", line 273, in search_youtube
r = ydl.extract_info(title, download=False)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 799, in extract_info
return self.__extract_info(url, ie, download, extra_info, process)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 806, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 838, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 876, in process_ie_result
return self.extract_info(ie_result['url'],
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 799, in extract_info
return self.__extract_info(url, ie, download, extra_info, process)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 806, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 838, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 924, in process_ie_result
return self.__process_playlist(ie_result, download)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 1058, in __process_playlist
entry_result = self.__process_iterable_entry(entry, download, extra)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 806, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 1067, in __process_iterable_entry
return self.process_ie_result(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 876, in process_ie_result
return self.extract_info(ie_result['url'],
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 799, in extract_info
return self.__extract_info(url, ie, download, extra_info, process)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in wrapper
self.report_error(compat_str(e), e.format_traceback())
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 628, in report_error
self.trouble(error_message, tb)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 598, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature
func = self._extract_signature_function(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
res = self._parse_sig_js(code)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\jsinterp.py", line 245, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; 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.
(caused by ExtractorError("Could not find JS function 'na'; 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.")); 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.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: DownloadError: ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature
func = self._extract_signature_function(
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
res = self._parse_sig_js(code)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "C:\Users\Vllad\AppData\Local\Programs\Python\Python38-32\lib\site-packages\youtube_dl\jsinterp.py", line 245, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; 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.
(caused by ExtractorError("Could not find JS function 'na'; 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.")); 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.

@Raptor123471 Raptor123471 linked a pull request Dec 15, 2021 that will close this issue
@Raptor123471 Raptor123471 self-assigned this Dec 15, 2021
@Raptor123471 Raptor123471 changed the title Error after add to queue Error after add to queue, ERROR: Signature extraction failed Dec 15, 2021
@Raptor123471 Raptor123471 changed the title Error after add to queue, ERROR: Signature extraction failed ERROR: Signature extraction failed, Could not find JS function 'na' Dec 15, 2021
@Raptor123471 Raptor123471 pinned this issue Dec 15, 2021
@Raptor123471
Copy link
Owner

PR #76 resolves this issue by switching to yt-dlp. Please reinstall the dependencies from config/requirements.txt, specifically the package yt-dlp. You will also need to perform a manual upgrade or just replace your current /musicbot/audiocontroller.py with the updated one from master branch.

@Gametz
Copy link
Author

Gametz commented Dec 16, 2021

PR #76 resolves this issue by switching to yt-dlp. Please reinstall the dependencies from config/requirements.txt, specifically the package yt-dlp. You will also need to perform a manual upgrade or just replace your current /musicbot/audiocontroller.py with the updated one from master branch.

Thx, its working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants