I am getting the below error when I try to run the yxi file from this community post I believe I have set it up correctly and it has worked for others so not sure why I am getting the error.
OCR (15) Traceback (most recent call last):¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen¶ httplib_response = self._make_request(¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request¶ self._validate_conn(conn)¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn¶ conn.connect()¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\urllib3\connection.py", line 414, in connect¶ self.sock = ssl_wrap_socket(¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket¶ ssl_sock = _ssl_wrap_socket_impl(¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl¶ return ssl_context.wrap_socket(sock, server_hostname=server_hostname)¶ File "C:\Program Files\Alteryx\bin\Miniconda3\lib\ssl.py", line 500, in wrap_socket¶ return self.sslsocket_class._create(¶ File "C:\Program Files\Alteryx\bin\Miniconda3\lib\ssl.py", line 1040, in _create¶ self.do_handshake()¶ File "C:\Program Files\Alteryx\bin\Miniconda3\lib\ssl.py", line 1309, in do_handshake¶ self._sslobj.do_handshake()¶ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)¶¶During handling of the above exception, another exception occurred:¶¶Traceback (most recent call last):¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\requests\adapters.py", line 489, in send¶ resp = conn.urlopen(¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen¶ retries = retries.increment(¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\urllib3\util\retry.py", line 592, in increment¶ raise MaxRetryError(_pool, url, error or ResponseError(cause))¶urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='tbcocr.cognitiveservices.azure.com', port=443): Max retries exceeded with url: /vision/v2.0/read/core/asyncBatchAnalyze (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))¶¶During handling of the above exception, another exception occurred:¶¶Traceback (most recent call last):¶ File "ocr.py", line 92, in ii_push_record¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\requests\api.py", line 115, in post¶ return request("post", url, data=data, json=json, **kwargs)¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\requests\api.py", line 59, in request¶ return session.request(method=method, url=url, **kwargs)¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\requests\sessions.py", line 587, in request¶ resp = self.send(prep, **send_kwargs)¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\requests\sessions.py", line 701, in send¶ r = adapter.send(request, **kwargs)¶ File "C:\ProgramData\Alteryx\Tools\OCR\Lib\site-packages\requests\adapters.py", line 563, in send¶ raise SSLError(e, request=request)¶requests.exceptions.SSLError: HTTPSConnectionPool(host='tbcocr.cognitiveservices.azure.com', port=443): Max retries exceeded with url: /vision/v2.0/read/core/asyncBatchAnalyze (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))¶
Hi @mmurph200 '
I would recommend following this article and modifying the cacert.pem file.
Hope this helps. If it does, please like this post and mark it as a solution.
@mmurph200 , May be its some access issue. Try running it in administrator mode and also check if you have all the access as per others.
Tried running it as an admin no luck
Hi @mmurph200
Is there a endpoint you are hitting for the OCR Tool?
Can you navigate to this location in a browser?
Inside the browser, there should be an SSL cert associated with the endpoint.
Can you follow these steps here :
Modify the cacert.pem files depending on which install you have:
Hope this helps. If it does, please like the post and mark it as a solution.
Hi,
create file pip.ini into <%appdata%\pip\> (if pip doesn't exist in %appdata%, create it) with the following content in it:
this resolved the SSL cert issue I had.