Skip to content

SSLError with the example code #97

Closed

Description

Following the code in the README

from mixpanel import Mixpanel
mp = Mixpanel(MIXPANEL_TOKEN)
mp.track(USER_ID, 'Upload Done')

I get:

MixpanelException: HTTPSConnectionPool(host='api-eu.mixpanel.com', port=443): Max retries exceeded with url: /track (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

I'm using Mixpanel 4.8.2, python '3.6.10 (default, Jun 6 2020, 21:56:05) \n[GCC 9.3.0]', certifi = ">=2017.4.17", requests 2.20.1, urllib3==1.24.1, Ubuntu 20.04.2 LTS. I also tried upgrading certifi to "2020.12.5" but that did not help.

If I try with

mp = Mixpanel(MIXPANEL_TOKEN, consumer=Consumer(verify_cert=False))

then it works (albeit with a warning).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions