We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug If the line import requests is added to the code example for service checks, I get an SSL error from the datadog api client.
import requests
To Reproduce Steps to reproduce the behavior:
{'status': 'ok'}
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.datadoghq.eu', port=443): Max retries exceeded with url: /api/v1/check_run (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
Expected behavior The import of requests should cause no change in behavior.
Environment and Versions (please complete the following information): linux
version for this project in use.
1.10.0
services, libraries, languages and tools list and versions. requests==2.22.0 pyOpenSSL==22.0.0 datadog_api_client==1.10.0 python 3.8.12
The text was updated successfully, but these errors were encountered:
Hi,
It looks more an issue with pyOpenSSL than requests. Can you upgrade requests to at least 2.24.0? It seems to work starting that version.
pyOpenSSL
requests
2.24.0
Sorry, something went wrong.
It works by upgrading. I also made it work with the workaround in #812 for those with older versions of requests. Thanks for taking a look @therve
No problem! For the record, the issue comes from the inject_into_urllib3 call which was removed in psf/requests#5443 (and is not recommended).
inject_into_urllib3
But if you're stuck with that version of requests (or want to use pyOpenSSL for some reasons), you can fix it by pass the CA certs directly, eg:
from datadog_api_client.v1 import Configuration import certifi configuration = Configuration(ssl_ca_cert=certifi.where())
No branches or pull requests
Describe the bug
If the line
import requests
is added to the code example for service checks, I get an SSL error from the datadog api client.To Reproduce
Steps to reproduce the behavior:
{'status': 'ok'}
import requests
to that code example.Expected behavior
The import of requests should cause no change in behavior.
Environment and Versions (please complete the following information):
linux
version for this project in use.
1.10.0
services, libraries, languages and tools list and versions.
requests==2.22.0
pyOpenSSL==22.0.0
datadog_api_client==1.10.0
python 3.8.12
The text was updated successfully, but these errors were encountered: