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

AttributeError: HTTPSConnectionV3 instance has no attribute '_tunnel_host' #1872

Closed
lacostenycoder opened this issue Dec 1, 2013 · 12 comments
Closed

Comments

@lacostenycoder
Copy link

@lacostenycoder lacostenycoder commented Dec 1, 2013

I have the latest version 3.3.3 of python and 11.29.2013 build of youtube-dl.

downloaded from command line in OSX 10.6.8.

why is this not working?

thanks

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Dec 1, 2013

Please post the full output when running youtube-dl WRITE_THE_URL_HERE --verbose.

@canamcy
Copy link

@canamcy canamcy commented Dec 1, 2013

I always run verbose, but editing on my Android screen is difficult. I also have a log file, but doesn't always work depending on how ytdl exits.

@lacostenycoder
Copy link
Author

@lacostenycoder lacostenycoder commented Dec 1, 2013

debug] System config: []
[debug] User config: []
[debug] Command-line args: ['www.youtube.com/embed/qZ2pb6BljLk', '--verbose']
[debug] youtube-dl version 2013.11.29
[debug] Python version 2.6.1 - Darwin-10.8.0-x86_64-i386-64bit
[debug] Proxy map: {}
[youtube] Setting language
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py", line 121, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 18, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 694, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 684, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 805, in download
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 428, in extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 130, in extract
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 125, in initialize
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 133, in _real_initialize
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 56, in _set_language
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 124, in urlopen
return _opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 401, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 561, in https_open
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1113, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 874, in request
self._send_request(method, url, body, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 911, in _send_request
self.endheaders()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 868, in endheaders
self._send_output()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 740, in _send_output
self.send(msg)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 699, in send
self.connect()
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 551, in connect
AttributeError: HTTPSConnectionV3 instance has no attribute '_tunnel_host'

@xubuntu4iran
Copy link

@xubuntu4iran xubuntu4iran commented Dec 1, 2013

@lacostenycoder
Copy link
Author

@lacostenycoder lacostenycoder commented Dec 1, 2013

I did, I get the same errors.

@lacostenycoder
Copy link
Author

@lacostenycoder lacostenycoder commented Dec 1, 2013

It must have something to do with that I'm on OSX10.6.8. I thought I needed to install python 3.3.3 which I had done before trying to install and run the program. I was able to use it fine on ubuntunu under vbox. any insights into why it won't work on the mac side?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Dec 1, 2013

It works fine on OSX 10.7 with python 2.6.7. You may have installed python 3.3, but youtube-dl is not picking it (it uses 2.6.1), because it uses the shebang #!/usr/bin/env python. You can download the source and run make youtube-dl PYTHON="/usr/bin/env python3" to get an executable that uses it, or put a symlink to the python3 executable as python at the start of your PATH. Another option is to use python 2.7 (is it installed by default on OSX?), which may not have that problem.

@lacostenycoder
Copy link
Author

@lacostenycoder lacostenycoder commented Dec 2, 2013

@jaimeMF thanks, and forgive my newbie questions. I downloaded source, when I try to use make youtube-dl PYTHON="/usr/bin/env python3" I get the response: make: `youtube-dl' is up to date. I tried to putting this file in /usr/bin/ and running it, i still get the same errors. I'm not sure if I'm using make correctly. Thanks for your help.

@lacostenycoder
Copy link
Author

@lacostenycoder lacostenycoder commented Dec 2, 2013

@jaimeMF Actually I kept plugging away and finally was able to get it working! Thanks again for your help!

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Dec 2, 2013

OK, the 'youtube-dl' is up to date.' message is because there's a [legacy youtube-dl file](https://github.com/rg3/youtube-dl/blob/master/youtube-dl), you can safely remove it and runmakeagain. If you want to be able to use the autoupdate system, you'll have to make sure that the version ofpython` is higher than yours (2.6.7 seems to be enough).

@xubuntu4iran
Copy link

@xubuntu4iran xubuntu4iran commented Dec 2, 2013

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Dec 2, 2013

I'll close it as a duplicate of #1860, as prevoiously said, newer versions of python seem too work, just remember to verify they are actually being used by youtube-dl (see the [debug] Python version 2.6.1 - Darwin-10.8.0-x86_64-i386-64bit line).
Thanks for the report.

@jaimeMF jaimeMF closed this Dec 2, 2013
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
4 participants
You can’t perform that action at this time.