You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working in a computer working behind a proxy wall and I need to have website certificate file to send request to any website. Is there a way to pass the key like 'cert' or 'cert_file' to the function app.add(url,cert='my_certificate_for_given_website.pem'?
I can see bunch of kwargs in app.add but I am not sure how we can pass the parameter verify to module requests or whichever module is used to download the website contents.
Code
importosfromembedchainimportApp# Replace this with your OpenAI keyos.environ["OPENAI_API_KEY"] =my_oenai_keyapp=App()
app.add("https://www.forbes.com/profile/elon-musk") # It gives SSL error here.app.add("https://en.wikipedia.org/wiki/Elon_Musk")
app.query("What is the net worth of Elon Musk today?")
Error Got
File [~\venv\py311embedchain\Lib\site-packages\requests\adapters.py:517](http://localhost:8888/lab/tree/aa_Learn/LLM/OpenAI/Some_modules/module_embedchain/~/venv/py311embedchain/Lib/site-packages/requests/adapters.py#line=516), in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
513 raise ProxyError(e, request=request)
515 if isinstance(e.reason, _SSLError):
516 # This branch is for urllib3 v1.22 and later.
--> 517 raise SSLError(e, request=request)
519 raise ConnectionError(e, request=request)
521 except ClosedPoolError as e:
SSLError: HTTPSConnectionPool(host='www.forbes.com', port=443): Max retries exceeded with url: /profile/elon-musk (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)')))
2024-03-18 12:45:28,235 - 3616 - _common.py-_common:105 - INFO: Backing off send_request(...) for 0.0s (requests.exceptions.SSLError: HTTPSConnectionPool(host='us-api.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)'))))
2024-03-18 12:45:28,693 - 3616 - _common.py-_common:105 - INFO: Backing off send_request(...) for 1.9s (requests.exceptions.SSLError: HTTPSConnectionPool(host='us-api.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)'))))
2024-03-18 12:45:31,102 - 3616 - _common.py-_common:105 - INFO: Backing off send_request(...) for 1.1s (requests.exceptions.SSLError: HTTPSConnectionPool(host='us-api.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)'))))
2024-03-18 12:45:32,789 - 3616 - _common.py-_common:120 - ERROR: Giving up send_request(...) after 4 tries (requests.exceptions.SSLError: HTTPSConnectionPool(host='us-api.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)'))))
Motivation, pitch
I am working on a computer which is working behind the proxy firewall and I need to have website certificate to download the contents of any website (eg. using request.get).
Currently, I am not sure how to pass the certificate to the app function: app.add(url), without passing the certificate file, I can not use the module.
I assume that many programmers working behind the proxy and it will be beneficial to all of us.
The text was updated successfully, but these errors were encountered:
馃殌 The feature
Problem
I am working in a computer working behind a proxy wall and I need to have website certificate file to send request to any website. Is there a way to pass the key like 'cert' or 'cert_file' to the function
app.add(url,cert='my_certificate_for_given_website.pem'
?I can see bunch of kwargs in
app.add
but I am not sure how we can pass the parameterverify
to modulerequests
or whichever module is used to download the website contents.Code
Error Got
Motivation, pitch
I am working on a computer which is working behind the proxy firewall and I need to have website certificate to download the contents of any website (eg. using
request.get
).Currently, I am not sure how to pass the certificate to the app function:
app.add(url)
, without passing the certificate file, I can not use the module.I assume that many programmers working behind the proxy and it will be beneficial to all of us.
The text was updated successfully, but these errors were encountered: