Cannot use authenticated download

Bug #1292794 reported by Kane York
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
youtube-dl (Ubuntu)
New
Undecided
Unassigned

Bug Description

Attempting to use the -u and -p options results in an AttributeError,

Addtl info:
 - Account has 2-factor auth enabled
 - The provided password is a app-specific password generated at https://accounts.google.com/b/0/IssuedAuthSubTokens

Log:

$ youtube-dl -u username -p app_specific_password private_video_id
[youtube] Setting language
Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 6, in <module>
    youtube_dl.main()
  File "/usr/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 666, in main
    _real_main(argv)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 650, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 573, in download
    videos = self.extract_info(url)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 324, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 102, in extract
    self.initialize()
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 97, in initialize
    self._real_initialize()
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 129, in _real_initialize
    if not self._login():
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 97, in _login
    login_form = dict((k.encode('utf-8'), v.encode('utf-8')) for k,v in login_form_strs.items())
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 97, in <genexpr>
    login_form = dict((k.encode('utf-8'), v.encode('utf-8')) for k,v in login_form_strs.items())
AttributeError: 'NoneType' object has no attribute 'encode'

Revision history for this message
Rolf Leggewie (r0lf) wrote :

This will be difficult to troubleshoot and verify unless a public test case can be provided. Kane, can you upload such a video (one that is set to private but for which you can grant access to testers)?

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Your best bet is probably to talk to upstream about it. If you do, please let us know the URL to track the progress.

Revision history for this message
Pander (pander) wrote :

Yeah, if this is still an issue, better report it upstream at https://github.com/rg3/youtube-dl/issues

Best to close it here as Ubuntu doesn't do more than build and package this and this is not package or build related.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.