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

SSL Certificate Verification on OSX (Py 3.6) #182

Open
ironstrider opened this issue Mar 9, 2017 · 3 comments
Open

SSL Certificate Verification on OSX (Py 3.6) #182

ironstrider opened this issue Mar 9, 2017 · 3 comments
Assignees

Comments

@ironstrider
Copy link
Contributor

Python 3.6 no longer uses OS X's bundled version of OpenSSL, which causes all web requests to fail.

Traceback (most recent call last):
  File "_/MyPyTutor/code/tutorlib/online/session.py", line 171, in _open
    return self._opener.open(url, data)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 564, in error
    result = self._call_chain(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 756, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1361, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1320, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>

See:

@ironstrider
Copy link
Contributor Author

@BraeWebb There is overlap between this and the keyring/keychain error (#181).

@applebyter We'll have to be sure to thoroughly check release notes before upgrading in future.

@ironstrider
Copy link
Contributor Author

As per release notes & /Applications/Python 3.6/ReadMe.rtf, running the following command resolves the issue.

/Applications/Python\ 3.6/Install\ Certificates.command

Long term, we need to bundle this with MPT's install. For now, we should instruct students to open a terminal and run the command.

@ironstrider
Copy link
Contributor Author

@applebyter @BraeWebb We'll leave the issue open until the fix is bundled with MPT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant