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

InternalPackageError when sending bulk message to an empty queryset #60

Closed
xtrinch opened this issue Oct 3, 2016 · 2 comments
Closed

Comments

@xtrinch
Copy link

xtrinch commented Oct 3, 2016

File "/home/vagrant/files/localove/management/commands/send_test_notification.py", line 13, in handle
devices.send_message(data={"test": "test"}, badge=5)
File "/home/vagrant/files/fcm-django/fcm_django/models.py", line 52, in send_message
*_kwargs
File "/home/vagrant/files/fcm-django/fcm_django/fcm.py", line 51, in fcm_send_bulk_message
*_kwargs
File "/home/vagrant/env/lib/python3.4/site-packages/pyfcm/fcm.py", line 190, in notify_multiple_devices
return self.send_request([payload])
File "/home/vagrant/env/lib/python3.4/site-packages/pyfcm/baseapi.py", line 200, in send_request
raise InternalPackageError("Please create a new github issue describing what you're doing")
pyfcm.errors.InternalPackageError: Please create a new github issue describing what you're doing

Basically what I was trying to do is send bulk message to an empty queryset. I do believe there are use cases when there are simply no devices that match the query and I think it should not be left to the user to check if the queryset count is larger than zero.

@xtrinch xtrinch changed the title InternalPackageError InternalPackageError when sending bulk message to an empty queryset Oct 3, 2016
@olucurious
Copy link
Owner

Update the library

pip install pyfcm --upgrade

@olucurious
Copy link
Owner

Okay, what's the new error message?

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

2 participants