Skip to content
New issue

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

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

Already on GitHub? # to your account

AttributeError: 'GatewayConnection' object has no attribute '_sent_notifications' #162

Open
ablegao opened this issue Mar 28, 2016 · 4 comments

Comments

@ablegao
Copy link

ablegao commented Mar 28, 2016

python 2.7.3

apns.gateway_server.send_notification_multiple(frame)
File "/home/gaoenbo/py27/local/lib/python2.7/site-packages/apns.py", line 559, in send_notification_multiple
self._sent_notifications += frame.get_notifications(self)
AttributeError: 'GatewayConnection' object has no attribute '_sent_notifications'
# Send multiple notifications in a single transmission
frame = Frame()
identifier = 1
expiry = time.time()+3600
priority = 10
frame.add_item('b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b87', payload, identifier, expiry, priority)
apns.gateway_server.send_notification_multiple(frame)
@Arti3DPlayer
Copy link

+1

1 similar comment
@sennoy
Copy link

sennoy commented May 26, 2016

+1

@farridav
Copy link

farridav commented Jun 7, 2016

This is due to the latest release not being available on pypi, perhaps install from github (until #163 is resolved) the issue has been resolved here 1842c40

@TerryZjl
Copy link

If you want to use enhance mode, please refer to document and specify enhanced=True,
apns_enhanced = APNs(use_sandbox=True, cert_file='apns.pem', enhanced=True)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants