question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED]

See original GitHub issue
$ youtube-dl -v -i https://www.youtube.com/watch?v=d7n34bkF-Ew
[debug] System config: []
[debug] User config: ['--proxy', 'http://127.0.0.1:8087', '-o', '~/Downloads/%(title)s.%(ext)s', '-f', '22']
[debug] Command-line args: ['-v', '-i', 'https://www.youtube.com/watch?v=d7n34bkF-Ew']
[debug] Encodings: locale 'UTF-8', fs 'utf-8', out 'UTF-8', pref: 'UTF-8'
[debug] youtube-dl version 2014.03.12
[debug] Python version 3.3.5 - Linux-3.13.7-1-ARCH-x86_64-with-arch
[debug] Proxy map: {'http': 'http://127.0.0.1:8087', 'https': 'http://127.0.0.1:8087'}
[youtube] Setting language
WARNING: unable to set language: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:548)>
[youtube] d7n34bkF-Ew: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:548)>
  File "/usr/lib/python3.3/site-packages/youtube_dl/extractor/common.py", line 192, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/lib/python3.3/site-packages/youtube_dl/YoutubeDL.py", line 1173, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.3/urllib/request.py", line 469, in open
    response = self._open(req, data)
  File "/usr/lib/python3.3/urllib/request.py", line 487, in _open
    '_open', req)
  File "/usr/lib/python3.3/urllib/request.py", line 447, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.3/urllib/request.py", line 1289, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib/python3.3/urllib/request.py", line 1251, in do_open
    raise URLError(err)

I think it’s related to python3, 'cause when I git cloned this repo and ran it with python2, everything just worked.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
phihagcommented, Mar 27, 2014

Python 2 does not check certificate validity. You can pass in the --no-check-certificate option to skip certificate validation under Python 3 as well. But that’s just handling the symptoms, not the cause of your error.

This error indicates that the SSL certificate was incorrect. While it can be caused by misconfiguration, this is a serious issue if you are worried about the privacy or integrity of your video viewing experience.

Does the error occur if you don’t pass in a proxy (i.e. add --proxy '' to the command line?) ? What output do get for

echo | openssl s_client -connect youtube.com:443

?

0reactions
yan12125commented, Oct 12, 2017

As a reference, you’ll need --no-check-certificate anyway as GAE-based proxies, including GoAgent and XX-Net, regenerates all SSL certificates.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - urllib and "SSL: CERTIFICATE_VERIFY_FAILED" Error
If you have installed Python 3.6 on OSX and are getting the "SSL: CERTIFICATE_VERIFY_FAILED" error when trying to connect to an https:// site,...
Read more >
urllib.error.URLError: <urlopen error [SSL ... - GitHub
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)> #5117.
Read more >
[Solved] urllib.error.URLError: [SSL - Clay-Technology World
Simply put, the error seems an error in verifying the SSL certificate. Maybe the target website uses a certificate signed by itself, I'm...
Read more >
What is an SSL 'Certificate_Verify_Failed' Error and How Do I ...
SSL certificate_verify_failed errors typically occur as a result of outdated Python default certificates or invalid root certificates. If you're a website owner ...
Read more >
How to Fix SSL: CERTIFICATE_VERIFY_FAILED Error In ...
It tracks the certificate chain back to its root for verification. If the certificate is not valid, it will indicate the error. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found