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

Signature extraction failed / 'NoneType' object has no attribute 'group' #7670

Closed
rptb1 opened this issue Nov 27, 2015 · 3 comments
Closed

Signature extraction failed / 'NoneType' object has no attribute 'group' #7670

rptb1 opened this issue Nov 27, 2015 · 3 comments

Comments

@rptb1
Copy link

@rptb1 rptb1 commented Nov 27, 2015

Version 2015.11.21 on OS X 10.9.5 installed via MacPorts.

Some (not all) videos are failing with a signature extraction error, but it also looks like the code is not handling this case very well by not checking for a None result.

Thanks!

$ youtube-dl -v 'https://www.youtube.com/watch?v=qfodIWqR0II'
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=qfodIWqR0II']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.11.21
[debug] Python version 2.7.10 - Darwin-13.4.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.8.2, ffprobe 2.8.2
[debug] Proxy map: {}
[youtube] qfodIWqR0II: Downloading webpage
[youtube] qfodIWqR0II: Downloading video info webpage
[youtube] qfodIWqR0II: Extracting video information
[youtube] {43} signature length 49.43, html5 player en_US-vflFEzfy7
[youtube] qfodIWqR0II: Downloading player https://s.ytimg.com/yts/jsbin/player-en_US-vflFEzfy7/base.js
ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 828, in _decrypt_signature
    video_id, player_url, s
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 755, in _extract_signature_function
    cache_res = res(test_string)
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 807, in <lambda>
    return lambda s: initial_function([s])
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 254, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 55, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 135, in interpret_expression
    self._objects[variable] = self.extract_object(variable)
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 220, in extract_object
    fields = obj_m.group('fields')
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; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 828, in _decrypt_signature
    video_id, player_url, s
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 755, in _extract_signature_function
    cache_res = res(test_string)
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 807, in <lambda>
    return lambda s: initial_function([s])
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 254, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 55, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 135, in interpret_expression
    self._objects[variable] = self.extract_object(variable)
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 220, in extract_object
    fields = obj_m.group('fields')
AttributeError: 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
  File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 661, in extract_info
    ie_result = ie.extract(url)
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 290, in extract
    return self._real_extract(url)
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1367, in _real_extract
    encrypted_sig, video_id, player_url, age_gate)
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 838, in _decrypt_signature
    'Signature extraction failed: ' + tb, cause=e)
ExtractorError: Signature extraction failed: Traceback (most recent call last):
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 828, in _decrypt_signature
    video_id, player_url, s
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 755, in _extract_signature_function
    cache_res = res(test_string)
  File "/opt/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 807, in <lambda>
    return lambda s: initial_function([s])
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 254, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 55, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 135, in interpret_expression
    self._objects[variable] = self.extract_object(variable)
  File "/opt/local/bin/youtube-dl/youtube_dl/jsinterp.py", line 220, in extract_object
    fields = obj_m.group('fields')
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; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 27, 2015

Such errors should be fixed in version 2015.11.24. Please update your copy via update instructions. Feel free to open a new issue if the problem is still in the latest version.

@yan12125 yan12125 closed this Nov 27, 2015
@rptb1
Copy link
Author

@rptb1 rptb1 commented Nov 27, 2015

Thanks @yan12125 . I did do "youtube-dl -U" before I submitted this issue, and followed the instructions (to use "port upgrade"). Perhaps "-U" should say this isn't enough?

@rptb1
Copy link
Author

@rptb1 rptb1 commented Nov 27, 2015

I did git clone, virtualenv, setup.py, and it all worked. Thanks.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.