Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
TypeError: __init__() got an unexpected keyword argument 'check_hostname' [while running 'Download the YouTube video'] #17974
Comments
|
Provide complete log with |
|
I added the verbose option to be True in Python.
I got the following log
|
|
I also had this issue and I am trying to find solution for this issue. Please help! |
|
I've encountered this same issue running Python The error seemed like it related to SSL since verifying the host name matches a certificate is expected with secure requests. Doing some research, I found this which led me to believe it had to do with Importing |
|
So digging in some more, it would appear this is because |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.10.05. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-vflag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):The issue was quite straight forward. I could run the following code in a single independent python file without any problem.
But when I run the same code in an Apache Beam program with the same virtual environment, it produces the following error:
File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 2001, in download url, force_generic_extractor=self.params.get('force_generic_extractor', False)) File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 792, in extract_info ie_result = ie.extract(url) File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 507, in extract ie_result = self._real_extract(url) File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/extractor/youtube.py", line 1519, in _real_extract video_webpage = self._download_webpage(url, video_id) File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 766, in _download_webpage expected_status=expected_status) File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/extractor/youtube.py", line 266, in _download_webpage_handle *args, **compat_kwargs(kwargs)) File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 632, in _download_webpage_handle urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status) File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 604, in _request_webpage return self._downloader.urlopen(url_or_request) File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 2211, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/anaconda3/envs/py27/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open response = self._open(req, data) File "/anaconda3/envs/py27/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open '_open', req) File "/anaconda3/envs/py27/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain result = func(*args) File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/utils.py", line 1139, in https_open req, **kwargs) File "/anaconda3/envs/py27/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1255, in do_open h = http_class(host, timeout=req.timeout, **http_conn_args) File "/anaconda3/envs/py27/lib/python2.7/site-packages/youtube_dl/utils.py", line 882, in _create_http_connection hc = http_class(*args, **compat_kwargs(kwargs)) TypeError: __init__() got an unexpected keyword argument 'check_hostname' [while running 'Download the YouTube video']