coursera-dl / edx-dl

A simple tool to download video lectures from edx.org (and other openedx sites)
GNU Lesser General Public License v3.0
1.93k stars 640 forks source link

error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed for MacOs #646

Open mrasitsen opened 4 years ago

mrasitsen commented 4 years ago

Subject of the issue

I type the command correctly and get a SSL error. there are some several solutions from past but they are all for linux not for macos. If anyone can help me that would be great.

Your environment

Steps to reproduce

I type this command: edx-dl --username user@user.com --password pass --list-courses (with my right user mail and password)

Actual behaviour

I get this error and cant make anything:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/bin/edx-dl", line 8, in sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/edx_dl/edx_dl.py", line 1005, in main headers = edx_get_headers() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/edx_dl/edx_dl.py", line 430, in edx_get_headers 'X-CSRFToken': _get_initial_token(EDX_HOMEPAGE), File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/edx_dl/edx_dl.py", line 167, in _get_initial_token opener.open(url) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 525, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1393, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1353, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>

olenasol commented 3 years ago

You need to install Python certificates. Try running open /Applications/Python\ 3.8/Install\ Certificates.command and than pip3 install --upgrade certificates