Connection Error
JackOfAllSkills opened this issue · 3 comments
I am using latest LLLSherpa to chunk a pdf but I always get this SSLCertVerificationError. I am using python 3.12 and using simple code llmsherpa_api_url = "https://readers.llmsherpa.com/api/document/developer/parseDocument?renderFormat=all"
pdf_reader = LayoutPDFReader(llmsherpa_api_url) doc = pdf_reader.read_pdf(pdf_url). Looks like it is a known issue and could have been resolved by disabling SSL check but I could not find anyway to handle it as connections are made by LayoutPDFReader with no handle to disable SSL check. Please guide me.
Error Details:
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
MaxRetryError: HTTPSConnectionPool(host='readers.llmsherpa.com', port=443): Max retries exceeded with url: /api/document/developer/parseDocument?renderFormat=all (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))
I did below and it worked:
1- browse on Mac to Applications > Python 3.11
2- double click on “Install Certificates.command”
This worked for me as well. thanks
1- browse on Mac to Applications > Python 3.11
2- double click on “Install Certificates.command”
Here is how I solved this issue in windows system, using VSCode, and created virtue env using miniconda
conda activate your_env_name
conda install certifi
conda update certifi
import os
import certifi
os.environ['SSL_CERT_FILE'] = certifi.where()