qpython-android / qpython.org

QPython contributor & sugguestion & question homepage
http://qpython.org
58 stars 11 forks source link

Trying to use several PushBullet libraries receiving error "EOF occurred in violation of protocol" #148

Open jps1x2 opened 7 years ago

jps1x2 commented 7 years ago

Hi,

i try to use several Pushbullet libraries to send notes to other devices and always receive the following error:

ssl.SSLError: [Errno 8] _ssl.c:503: EOF occurred in violation of protocol.

Could you help me please?

Thanks in advance

jps1x2

jps1x2 commented 7 years ago

Tested first installing on pip_console.py following library:

pip install PushyBullet

And after installing on my qpython, testing following script receive indicated message:

import pushybullet as pb API_KEY = 'myapiKey' idRPI2='myIdDevice' api = pb.PushBullet(API_KEY) devices = api.devices() print str(devices) device = pb.Device(api, idRPI2) push = pb.NotePush('message', 'title') push.send(device)

Message received:

/data/user/0/org.qpython.qpy/files/bin/qpython-android5.sh "/storage/emulated/0/qpython/scripts/pbEnviaNotaSimplePushy.py" && exit bEnviaNotaSimplePushy.py" && exit < <class 'pushybullet.Device'> Traceback (most recent call last): File "/storage/emulated/0/qpython/scripts/pbEnviaNotaSimplePushy.py", line 5, in devices = api.devices() File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/PushyBullet-1.5.4-py2.7.egg/pushybullet.py", line 1022, in wrapper setattr(self, cache_key, list(cls.iterate(self))) File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/PushyBullet-1.5.4-py2.7.egg/pushybullet.py", line 343, in return (cls(api, o) for o in it if o.get('active', False)) File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/PushyBullet-1.5.4-py2.7.egg/pushybullet.py", line 1147, in paged page = self.get(_uri, params) File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/PushyBullet-1.5.4-py2.7.egg/pushybullet.py", line 1130, in get response = self.sess.get(self.API_URL % _uri, params=params) File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/PushyBullet-1.5.4-py2.7.egg/pushybullet.py", line 84, in get return self._request('GET', url, params=params, auth=auth, headers=headers) File "/data/user/0/org.qpython.qpy/files/lib/python2.7/site-packages/PushyBullet-1.5.4-py2.7.egg/pushybullet.py", line 182, in _request conn.request(method, '?'.join((_url.path, _query)), _data, _headers) File "/QPython/QPython2-core/build/python-install/lib/python2.7/httplib.py", line 955, in request File "/QPython/QPython2-core/build/python-install/lib/python2.7/httplib.py", line 989, in _send_request File "/QPython/QPython2-core/build/python-install/lib/python2.7/httplib.py", line 951, in endheaders File "/QPython/QPython2-core/build/python-install/lib/python2.7/httplib.py", line 811, in _send_output File "/QPython/QPython2-core/build/python-install/lib/python2.7/httplib.py", line 773, in send File "/QPython/QPython2-core/build/python-install/lib/python2.7/httplib.py", line 1158, in connect File "/QPython/QPython2-core/build/python-install/lib/python2.7/ssl.py", line 372, in wrap_socket File "/QPython/QPython2-core/build/python-install/lib/python2.7/ssl.py", line 134, in init File "/QPython/QPython2-core/build/python-install/lib/python2.7/ssl.py", line 296, in do_handshake ssl.SSLError: [Errno 8] _ssl.c:503: EOF occurred in violation of protocol 1|u0_a178@j5nlte:/ $