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

Uncaught Exception "ValueError: unknown url type" Causing Stacktrace #3926

Closed
thomasrussellmurphy opened this issue Oct 11, 2014 · 2 comments
Closed

Comments

@thomasrussellmurphy
Copy link

@thomasrussellmurphy thomasrussellmurphy commented Oct 11, 2014

Running youtube-dl www.vimeo.com/45684858 results in:

[vimeo] 45684858: Downloading webpage
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 "/Users/thomasrussellmurphy/bin/youtube-dl/__main__.py", line 18, in <module>
  File "/Users/thomasrussellmurphy/bin/youtube-dl/youtube_dl/__init__.py", line 431, in main
  File "/Users/thomasrussellmurphy/bin/youtube-dl/youtube_dl/__init__.py", line 421, in _real_main
  File "/Users/thomasrussellmurphy/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1067, in download
  File "/Users/thomasrussellmurphy/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 524, in extract_info
  File "/Users/thomasrussellmurphy/bin/youtube-dl/youtube_dl/extractor/common.py", line 193, in extract
  File "/Users/thomasrussellmurphy/bin/youtube-dl/youtube_dl/extractor/vimeo.py", line 218, in _real_extract
  File "/Users/thomasrussellmurphy/bin/youtube-dl/youtube_dl/extractor/common.py", line 306, in _download_webpage
  File "/Users/thomasrussellmurphy/bin/youtube-dl/youtube_dl/extractor/common.py", line 246, in _download_webpage_handle
  File "/Users/thomasrussellmurphy/bin/youtube-dl/youtube_dl/extractor/common.py", line 226, in _request_webpage
  File "/Users/thomasrussellmurphy/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1266, in urlopen
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 396, in open
    protocol = req.get_type()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 258, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: www.vimeo.com/45684858

Running youtube-dl http://vimeo.com/45684858 causes youtube-dl to behave correctly and download the video.

Should this exception be uncaught or should it be caught to allow for a clean exit without stack trace?

@jaimeMF jaimeMF closed this in 3357110 Oct 11, 2014
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Oct 11, 2014

Thanks for the report, in the next version the generic extractor will redirect to the url with the protocol.

@phihag
Copy link
Contributor

@phihag phihag commented Oct 12, 2014

This issue has been fixed in youtube-dl 2014.10.12. Type youtube-dl -U to update.

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.