jaraco / wolframalpha

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[SSL: CERTIFICATE_VERIFY_FAILED]

DanielCaminero87 opened this issue · comments

How do I get this fixed its giving me an ssl error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/danielcaminero/Library/Mobile Documents/com~apple~CloudDocs/SJ-000/pyda/pyda.py", line 32, in <module>
    res = client.query("hi")
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/wolframalpha/__init__.py", line 51, in query
    resp = urllib.request.urlopen(url)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 517, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1385, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1345, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1122)>

That error "self signed certificate in certificate chain" suggests that urllib.request.urlopen('https://api.wolframalpha.com') is somehow triggering the certificate validation failure in your environment. I suspect you have some service between your host and wolframalpha that's intercepting the traffic.

Are you able to able to run that command?

Probably this issue is unrelated to this library and you should search that error message in another forum. Probably, you just need to install trusted certificates or figure out why your traffic is being intercepted and disrupting the trust chain.