alfred-urban-dictionary icon indicating copy to clipboard operation
alfred-urban-dictionary copied to clipboard

Certificate verify failed

Open filipruisl opened this issue 1 year ago • 1 comments

Is it me, or is it you? :)

[16:13:11.595] Logging Started...
[16:13:16.424] Urban Dictionary[Script Filter] Queuing argument 'jtmc'
[16:13:16.882] Urban Dictionary[Script Filter] Script with argv '(null)' finished
[16:13:16.887] ERROR: Urban Dictionary[Script Filter] Code 1: .
16:13:16 workflow.py:2269 DEBUG    ---------- Urban Dictionary (2.2.0) ----------
16:13:16 workflow.py:1675 DEBUG    reading settings from /Users/phylyp/Library/Application Support/Alfred/Workflow Data/com.xilopaint.alfredapp.urbandictionary/settings.json
16:13:16 workflow.py:2670 DEBUG    update check not due
16:13:16 workflow.py:1897 DEBUG    loading cached data: /Users/phylyp/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.xilopaint.alfredapp.urbandictionary/__workflow_latest_version.pickle
16:13:16 workflow.py:2290 ERROR    <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1454, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 512, in wrap_socket
    return self.sslsocket_class._create(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1070, in _create
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1341, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/phylyp/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.5BDDCD45-8F90-4B84-8D1F-60CF14ADD08B/workflow/workflow.py", line 2283, in run
    func(self)
  File "/Users/phylyp/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.5BDDCD45-8F90-4B84-8D1F-60CF14ADD08B/urban_dictionary.py", line 30, in main
    r = web.get(url, params=param)
  File "/Users/phylyp/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.5BDDCD45-8F90-4B84-8D1F-60CF14ADD08B/workflow/web.py", line 580, in get
    return request(
  File "/Users/phylyp/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.5BDDCD45-8F90-4B84-8D1F-60CF14ADD08B/workflow/web.py", line 563, in request
    return Response(req, stream)
  File "/Users/phylyp/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.5BDDCD45-8F90-4B84-8D1F-60CF14ADD08B/workflow/web.py", line 210, in __init__
    self.raw = urllib.request.urlopen(request)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, 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:997)>
16:13:16 workflow.py:2292 INFO     for assistance, see: https://github.com/xilopaint/alfred-urban-dictionary
16:13:16 workflow.py:2312 DEBUG    ---------- finished in 0.286s ----------
[16:13:16.890] Urban Dictionary[Script Filter] {
  "items": [
    {
      "title": "Error in workflow 'Urban Dictionary'",
      "subtitle": "<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>",
      "valid": false,
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
      }
    }
  ]
}

filipruisl avatar Aug 24 '22 14:08 filipruisl

I don't have any issues. It seems to be related to your Python environment. There's some discussion about this with possible solutions here.

xilopaint avatar Aug 24 '22 18:08 xilopaint

Solved! Thanks :)

filipruisl avatar Sep 21 '22 15:09 filipruisl