Bug 1028701

Summary: [abrt] youtube-dl-2013.10.18.2-1.fc20: urllib2.py:1186:do_open:URLError: <urlopen error [Errno 22] Invalid argument>
Product: [Fedora] Fedora Reporter: Porfirio Paiz <porfiriopaiz>
Component: youtube-dlAssignee: Christopher Meng <i>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: danie, ezwen-redhatbugzilla, i, metherid, opensource
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/acafdb9f3ad1839fa9497e05bd422c8ae3b98561
Whiteboard: abrt_hash:3dbd58078c4944ad8e465cb2329e0382347f3847
Fixed In Version: youtube-dl-2014.08.29-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-09 22:21:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Porfirio Paiz 2013-11-09 18:25:37 UTC
Description of problem:
When i was trying to download the video from youtube, by specifying the format whith the line:
youtube-dl -F 43 http://www.youtube.com/watch?v=eYO1-gGWJyo

It's seem to not work, the "-F 43" is for specifying the format, but this give us:

$ youtube-dl -F 43 http://www.youtube.com/watch?v=eYO1-gGWJyo
WARNING: The url doesn't specify the protocol, trying with http
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/bin/youtube-dl/__main__.py", line 18, in <module>
  File "/usr/bin/youtube-dl/youtube_dl/__init__.py", line 761, in main
  File "/usr/bin/youtube-dl/youtube_dl/__init__.py", line 714, in _real_main
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 700, in download
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 368, in extract_info
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 400, in process_ie_result
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 353, in extract_info
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 117, in extract
  File "/usr/bin/youtube-dl/youtube_dl/extractor/generic.py", line 120, in _real_extract
  File "/usr/bin/youtube-dl/youtube_dl/extractor/generic.py", line 102, in _test_redirect
  File "/usr/lib64/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 1216, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib64/python2.7/urllib2.py", line 1186, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 22] Invalid argument>

Version-Release number of selected component:
youtube-dl-2013.10.18.2-1.fc20

Additional info:
reporter:       libreport-2.1.9
cmdline:        python /usr/bin/youtube-dl -F 43 http://www.youtube.com/watch?v=MH_5Ko7QCi8#t=0
dso_list:       python-libs-2.7.5-8.fc20.x86_64
executable:     /usr/bin/youtube-dl
kernel:         3.11.7-300.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
urllib2.py:1186:do_open:URLError: <urlopen error [Errno 22] Invalid argument>

Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/bin/youtube-dl/__main__.py", line 18, in <module>
    youtube_dl.main()
  File "/usr/bin/youtube-dl/youtube_dl/__init__.py", line 761, in main
    _real_main(argv)
  File "/usr/bin/youtube-dl/youtube_dl/__init__.py", line 714, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 700, in download
    videos = self.extract_info(url)
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 368, in extract_info
    return self.process_ie_result(ie_result, download=download)
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 400, in process_ie_result
    extra_info=extra_info)
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 353, in extract_info
    ie_result = ie.extract(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 117, in extract
    return self._real_extract(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/generic.py", line 120, in _real_extract
    new_url = self._test_redirect(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/generic.py", line 102, in _test_redirect
    response = opener.open(HeadRequest(url))
  File "/usr/lib64/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 1216, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib64/python2.7/urllib2.py", line 1186, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 22] Invalid argument>

Local variables in innermost frame:
err: error(22, 'Invalid argument')
h: <httplib.HTTPConnection instance at 0x1e249e0>
self: <urllib2.HTTPHandler instance at 0x1e29fc8>
req: <youtube_dl.extractor.generic.HeadRequest instance at 0x1e245f0>
headers: {'Host': '43', 'Connection': 'close', 'User-Agent': 'Python-urllib/2.7'}
host: '43'
http_class: <class httplib.HTTPConnection at 0x1799460>

Comment 1 Porfirio Paiz 2013-11-09 18:25:45 UTC
Created attachment 821949 [details]
File: backtrace

Comment 2 Porfirio Paiz 2013-11-09 18:25:48 UTC
Created attachment 821950 [details]
File: environ

Comment 3 Christopher Meng 2013-11-10 09:39:09 UTC
I'm not sure if you are using the correct syntax supported by upstream.

BTW please enable updates-testing repo for this package as I've pushed the 11.07 verson to testing.

Comment 4 Till Maas 2014-09-07 12:28:08 UTC
The format needs to be specified with youtube-dl -f 43 URL, it is a lowercase f.

Comment 5 Fedora Update System 2014-09-07 12:28:55 UTC
youtube-dl-2014.08.29-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2014-10058/youtube-dl-2014.08.29-1.fc20

Comment 6 Fedora Update System 2014-09-09 22:21:38 UTC
youtube-dl-2014.08.29-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.