When I run the following code block to load the docs using langchain, I get SSL verification error. I am not an expert using langchain. Please share tips on how to fix this issue.
from bs4 import BeautifulSoup as Soup
url = "https://docs.python.org/3.9/"
loader = RecursiveUrlLoader(
url=url, max_depth=2, extractor=lambda x: Soup(x, "html.parser").text
)
docs = loader.load()
Below error is encountered while executing the above code.
Unable to load from https://docs.python.org/3.9/. Received error > HTTPSConnectionPool(host=’docs.python.org’, port=443): Max retries exceeded with url: /3.9/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)’))) of type SSLError