linkedin / linkedin/pyexchange

line 67 in connection.py unhandled exception

Open
#38 6 comments 0 reactions 1 assignee Claimed by @catermelon View on GitHub
Dominant language
Python
Stars
154
Forks
91
PR merge metrics
No merged PRs in 30d

Description

The try-catch block has a unhandled exception in the catch statement in line 67. This happens when we pass a url that is of type 'https' but it does not have a valid certificate certified by a CA.

This throws the following exception:
`>>> c.list_events(start=start_xchange, end=end_exchange, details=True)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/pyexchange/exchange2010/__init__.py", line 95, in list_events
return Exchange2010CalendarEventList(service=self.service, start=start, end=end, details=details)
File "/usr/local/lib/python2.7/dist-packages/pyexchange/exchange2010/__init__.py", line 113, in __init__
response_xml = self.service.send(body)
File "/usr/local/lib/python2.7/dist-packages/pyexchange/base/soap.py", line 34, in send
response = self._send_soap_request(request_xml, headers=headers, retries=retries, timeout=timeout, encoding=encoding)
File "/usr/local/lib/python2.7/dist-packages/pyexchange/exchange2010/__init__.py", line 44, in _send_soap_request
return super(Exchange2010Service, self)._send_soap_request(body, headers=headers, retries=retries, timeout=timeout, encoding=encoding)
File "/usr/local/lib/python2.7/dist-packages/pyexchange/base/soap.py", line 65, in _send_soap_request
response = self.connection.send(body, headers, retries, timeout)
File "/usr/local/lib/python2.7/dist-packages/pyexchange/connection.py", line 67, in send
log.debug(err.response.content)
AttributeError: 'NoneType' object has no attribute 'content'
`

This is thrown because of `_ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed` in the requests (line 64) has verify=True set by default. Turning that flag off does everything normally.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.