djacobs / PyAPNs

Python library for interacting with the Apple Push Notification service (APNs)
http://pypi.python.org/pypi/apns/
MIT License
1.22k stars 374 forks source link

OError: [Errno 19] Operation not supported by device #140

Closed ikousik closed 8 years ago

ikousik commented 8 years ago

I am getting this error. Whats going wrong?

Traceback (most recent call last):
  File "<pyshell#19>", line 1, in <module>
    apns.gateway_server.send_notification(token_hex, payload)
  File "/Library/Python/2.7/site-packages/apns.py", line 544, in send_notification
    self.write(self._get_notification(token_hex, payload))
  File "/Library/Python/2.7/site-packages/apns.py", line 273, in write
    return self._connection().write(string)
  File "/Library/Python/2.7/site-packages/apns.py", line 254, in _connection
    self._connect()
  File "/Library/Python/2.7/site-packages/apns.py", line 230, in _connect
    self._ssl = wrap_socket(self._socket, self.key_file, self.cert_file)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 891, in wrap_socket
    ciphers=ciphers)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 509, in __init__
    self._context.load_cert_chain(certfile, keyfile)
IOError: [Errno 19] Operation not supported by device
AhnSeongHyun commented 8 years ago

Refer this : http://stackoverflow.com/questions/33826649/pyapns-throws-ioerror-operation-not-supported-by-device