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

'_PseudoRequest' object has no attribute 'get_type' when downloading private YouTube video #4910

Closed
cozgood opened this issue Feb 9, 2015 · 8 comments

Comments

@cozgood
Copy link

@cozgood cozgood commented Feb 9, 2015

Very similar to #4861

[jpro:~/Downloads] jesse% /opt/local/bin/youtube-dl -u xxx 'https://www.youtube.com/watch?v=xxx' -p xxx -2 xxx
[youtube] Downloading login page
[youtube] Logging in
[youtube] Submitting TFA code
[youtube] Ohnccq2SLvY: Downloading webpage
[youtube] Ohnccq2SLvY: Extracting video information
[youtube] Ohnccq2SLvY: Downloading DASH manifest
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/opt/local/bin/youtube-dl/main.py", line 19, in
File "/opt/local/bin/youtube-dl/youtube_dl/init.py", line 382, in main
File "/opt/local/bin/youtube-dl/youtube_dl/init.py", line 372, in _real_main
File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1353, in download
File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 630, in extract_info
File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 676, in process_ie_result
File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1024, in process_video_result
File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 916, in _calc_headers
File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 942, in _calc_cookies
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1324, in add_cookie_header
cookies = self._cookies_for_request(request)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1250, in _cookies_for_request
cookies.extend(self._cookies_for_domain(domain, request))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1239, in _cookies_for_domain
if not self._policy.return_ok(cookie, request):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1071, in return_ok
if not fn(cookie, request):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1097, in return_ok_secure
if cookie.secure and request.get_type() != "https":
AttributeError: '_PseudoRequest' object has no attribute 'get_type'

@phihag
Copy link
Contributor

@phihag phihag commented Feb 9, 2015

I suspect that you are using an outdated version of youtube-dl. Can you post the output you get when you add -v to the command line?

@cozgood
Copy link
Author

@cozgood cozgood commented Feb 11, 2015

I don't think that's it. I updated from 02-02-2015 when i saw the bug. Currently have youtube-dl @2015.02.06 (net) installed.

@phihag
Copy link
Contributor

@phihag phihag commented Feb 11, 2015

Sorry, the information included in the output you get with -v is vital for us to debug issues in general (that's why the note is featured prominently in our contribution notes).

I am not sure why you refuse to share that information, but we cannot in good faith extend support to users who are unwilling to provide us any debugging information.

Therefore, I am closing this issue. Feel free to provide the requested information and we'll reopen it.

@phihag phihag closed this Feb 11, 2015
@cozgood
Copy link
Author

@cozgood cozgood commented Feb 11, 2015

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v']
[debug] Encodings: locale US-ASCII, fs utf-8, out US-ASCII, pref US-ASCII
[debug] youtube-dl version 2015.02.06
[debug] Python version 2.7.9 - Darwin-14.1.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.5.3, ffprobe 2.5.3
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.

@phihag
Copy link
Contributor

@phihag phihag commented Feb 11, 2015

That does not show the error. Please post the output you get when you add -v and when the error occurs.

@ebpitts
Copy link

@ebpitts ebpitts commented Feb 20, 2015

I can reproduce this issue. Here is the requested debugging information:

$ youtube-dl -u $GUSER --twofactor $TFA -v 'https://www.youtube.com/playlist?list=PLs9IzzdUqHtpMZWdahZXEsuqwVts-si0U'
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-u', u'PRIVATE', '--twofactor', '187972', '-v', 'https://www.youtube.com/playlist?list=PLs9IzzdUqHtpMZWdahZXEsuqwVts-si0U']
Type account password and press [Return]:
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.02.09.3
[debug] Python version 2.7.6 - Darwin-14.1.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.5.3, ffprobe 2.5.3
[debug] Proxy map: {}
[youtube:playlist] Downloading login page
[youtube:playlist] Logging in
[youtube:playlist] Submitting TFA code
[youtube:playlist] PLs9IzzdUqHtpMZWdahZXEsuqwVts-si0U: Downloading webpage
[download] Downloading playlist: Engineering Bootcamp September 2014
[youtube:playlist] playlist Engineering Bootcamp September 2014: Collected 19 video ids (downloading 19 of them)
[download] Downloading video 1 of 19
[youtube] Downloading login page
[youtube] Logging in
[youtube] hxAOFgc9umM: Downloading webpage
[youtube] hxAOFgc9umM: Extracting video information
[youtube] hxAOFgc9umM: Downloading DASH manifest
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 382, in main
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 372, in _real_main
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1373, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 630, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 789, in process_ie_result
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 683, in process_ie_result
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 630, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 676, in process_ie_result
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1044, in process_video_result
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 933, in _calc_headers
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 962, in _calc_cookies
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1324, in add_cookie_header
    cookies = self._cookies_for_request(request)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1250, in _cookies_for_request
    cookies.extend(self._cookies_for_domain(domain, request))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1239, in _cookies_for_domain
    if not self._policy.return_ok(cookie, request):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1071, in return_ok
    if not fn(cookie, request):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cookielib.py", line 1097, in return_ok_secure
    if cookie.secure and request.get_type() != "https":
AttributeError: '_PseudoRequest' object has no attribute 'get_type'
@phihag
Copy link
Contributor

@phihag phihag commented Feb 20, 2015

@ebpitts Can you also reproduce the issue with the latest version? See our FAQ if you have trouble updating.

@ebpitts
Copy link

@ebpitts ebpitts commented Feb 20, 2015

Sorry, 2015.02.09.3 and 2015.02.19.3 looked similar at a glance, and I didn't realize I didn't have the latest version.

Good news! I can no longer reproduce the problem.

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
3 participants
You can’t perform that action at this time.