Skip to content

import requests gives SSL error in datadog client #873

@leetemil

Description

@leetemil

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:

  1. Go to https://docs.datadoghq.com/api/latest/service-checks/
  2. Run the python code example and see that it indeed works with response {'status': 'ok'}
  3. Add import requests to that code example.
  4. See error, with traceback ending with something as follows
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions