richard-better / pushbullet.py

A python client for http://pushbullet.com
MIT License
575 stars 110 forks source link

Pushes Fail with 'requests.exceptions.SSLError' #103

Closed sabarish007 closed 7 years ago

sabarish007 commented 7 years ago

I am using the library for the past 6 months and never had any issues sending pushes. Recently my code fails when trying to send pushes and I receive the following error.

Traceback (most recent call last): File "./pushbullet", line 74, in pb = Pushbullet('o.foofoofoofoofoobarbarbarbarbar') #get the token authenticated by pushbullet File "/usr/local/lib/python2.7/dist-packages/pushbullet/pushbullet.py", line 29, in __init__ self.refresh() File "/usr/local/lib/python2.7/dist-packages/pushbullet/pushbullet.py", line 288, in refresh self._load_devices() File "/usr/local/lib/python2.7/dist-packages/pushbullet/pushbullet.py", line 42, in _load_devices resp_dict = self._get_data(self.DEVICES_URL) File "/usr/local/lib/python2.7/dist-packages/pushbullet/pushbullet.py", line 32, in _get_data resp = self._session.get(url) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 467, in get return self.request('GET', url, kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request resp = self.send(prep, send_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send r = adapter.send(request, **kwargs) File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 385, in send raise SSLError(e) requests.exceptions.SSLError: [Errno 8] _ssl.c:510: EOF occurred in violation of protocol

sabarish007 commented 7 years ago

SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures.

InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.

These were the warning I got from urllib3. Fixed by using pyOpenSSL and latest OpenSSL libraries.

Closing the issue since it is not directly related to pushbullet.py -- Thanks and kudos to the developers