Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there an Error In Documentation #176

Open
ashish7195 opened this issue Sep 26, 2016 · 0 comments
Open

Is there an Error In Documentation #176

ashish7195 opened this issue Sep 26, 2016 · 0 comments

Comments

@ashish7195
Copy link

ashish7195 commented Sep 26, 2016

In case of enhanced notifications, the apns object in the documentation don't have the key file in it. Have you missed it by chance or it will work like that. Because my code gets blocked if I don't add the key file but work by including it.

apns_enhanced = APNs(use_sandbox=True, cert_file='apns.pem', enhanced=True)

Also, I am getting the following error in both the cases.

apns.gateway_server.send_notification(token_hex, payload, identifier=identifier)
  File "/usr/local/lib/python2.7/dist-packages/apns.py", line 533, in send_notification
    self.write(message)
  File "/usr/local/lib/python2.7/dist-packages/apns.py", line 263, in write
    _, wlist, _ = select.select([], [self._connection()], [], WAIT_WRITE_TIMEOUT_SEC)
  File "/usr/local/lib/python2.7/dist-packages/apns.py", line 254, in _connection
    self._connect()
  File "/usr/local/lib/python2.7/dist-packages/apns.py", line 216, in _connect
    self._ssl.do_handshake()
  File "/usr/lib/python2.7/ssl.py", line 405, in do_handshake
    self._sslobj.do_handshake()
AttributeError: 'NoneType' object has no attribute 'do_handshake'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant