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

Checking formats of YouTube video gives AttributeError: 'NoneType' object has no attribute 'group' #30371

Closed
6 tasks done
YoshiRulz opened this issue Dec 15, 2021 · 2 comments
Closed
6 tasks done

Comments

@YoshiRulz
Copy link

YoshiRulz commented Dec 15, 2021

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2021.06.06
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '-F', 'https://www.youtube.com/watch?v=mgsayvglv5o']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.06.06
[debug] Lazy loading extractors enabled
[debug] Python version 3.9.6 (CPython) - Linux-5.12.0-1-MANJARO-x86_64-with-glibc2.33
[debug] exe versions: ffmpeg 4.4, ffprobe 4.4, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] mgsayvglv5o: Downloading webpage
[youtube] mgsayvglv5o: Downloading player 204bfffb
ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
    func = self._extract_signature_function(
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
    initial_function = jsi.extract_function(funcname)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 523, in extract_function
    return self.extract_function_from_code(*self.extract_function_code(funcname))
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 517, in extract_function_code
    code, _ = self._separate_at_paren(func_m.group('code'), '}')  # refine the match
AttributeError: 'NoneType' object has no attribute 'group'
 (caused by AttributeError("'NoneType' object has no attribute 'group'")); 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.
Traceback (most recent call last):
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
    func = self._extract_signature_function(
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
    initial_function = jsi.extract_function(funcname)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 523, in extract_function
    return self.extract_function_from_code(*self.extract_function_code(funcname))
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 517, in extract_function_code
    code, _ = self._separate_at_paren(func_m.group('code'), '}')  # refine the match
AttributeError: 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
    func = self._extract_signature_function(
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
    initial_function = jsi.extract_function(funcname)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 523, in extract_function
    return self.extract_function_from_code(*self.extract_function_code(funcname))
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 517, in extract_function_code
    code, _ = self._separate_at_paren(func_m.group('code'), '}')  # refine the match
AttributeError: 'NoneType' object has no attribute 'group'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1623, in _real_extract
    signature = self._decrypt_signature(sc['s'][0], video_id, player_url)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/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 "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
    func = self._extract_signature_function(
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
    initial_function = jsi.extract_function(funcname)
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 523, in extract_function
    return self.extract_function_from_code(*self.extract_function_code(funcname))
  File "/nix/store/kqc66vqmfsdrmx5jlv8ssflvajqjwvdq-python3.9-youtube-dl-2021.06.06/lib/python3.9/site-packages/youtube_dl/jsinterp.py", line 517, in extract_function_code
    code, _ = self._separate_at_paren(func_m.group('code'), '}')  # refine the match
AttributeError: 'NoneType' object has no attribute 'group'
 (caused by AttributeError("'NoneType' object has no attribute 'group'")); 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.

Description

Attempting to download, or even attempting to list the available formats of, mgsayvglv5o seemingly any autogenerated video seemingly any video with music fails with AttributeError: 'NoneType' object has no attribute 'group'. This is probably caused by YouTube changing the pages it serves; I checked my shell history and videos which were playable yesterday are now broken.

Examples of videos which cause the error: mgsayvglv5o EFEmTsfFL5A
Example of a working video: WLIfbiTUMiU

My copy of youtube-dl is installed via Nix.

@dirkf
Copy link
Contributor

dirkf commented Dec 15, 2021

Something has changed: I can't reproduce this even without a patch for the signature issue, which is definitely exhibited in your log.

As shown by the difference between your log and that in #30363 (and other reports), your yt-dl is a special build and you should raise the issue at https://github.com/NixOS/nixpkgs/issues.

@YoshiRulz
Copy link
Author

Opened NixOS/nixpkgs#150843.

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

No branches or pull requests

2 participants