Baguage / pyqualtrics

Unofficial python SDK for Qualtrics API
Apache License 2.0
33 stars 7 forks source link

SSLError in Request #22

Closed johndavidsimmons closed 8 years ago

johndavidsimmons commented 8 years ago

http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification

Requests enables SSL verification by default, but it can be disabled by passing the optional arg verify=False.

Qualtrics API calls behind a strict firewall (at my work for example) will raise SSLError: [SSL: CERTIFICATE_VERIFY_FAILED]. Setting verify to False gets around this.

Baguage commented 8 years ago

Good point. I just checked in a hotfix that adds "requests_kwargs" option - additional options for the request library. To disable SSL cert validation, you can set it to {"verify": False}

       qualtrics = Qualtrics("user", "pass")
       qualtrics.requests_kwargs = {"verify": False}
       result = qualtrics.getLegacyResponseData(SurveyID=survey_id)

Does it fix your problem?

johndavidsimmons commented 8 years ago

Yep! Thanks

Baguage commented 8 years ago

Awesome! I was going to release a new version, v0.6.0 in a couple of days, so this will be available through "pip install" soon.