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

I got exception KeyError when send_message() #526

Closed
teripak opened this issue Sep 2, 2019 · 1 comment
Closed

I got exception KeyError when send_message() #526

teripak opened this issue Sep 2, 2019 · 1 comment
Labels

Comments

@teripak
Copy link

teripak commented Sep 2, 2019

Hi,
I have below error when I send a web push message by using send_message("test message")

        from push_notifications.models import WebPushDevice

        try:

            devices = WebPushDevice.objects.filter(Q(user=request.user))

            for d in devices:

                d.send_message("test message")

        except Exception as e:

            print('%s => %s (%s)' % ('Exception: device_reg', e, type(e)))

Exception: device_reg => 'Chrome' (<class 'KeyError'>)

The environments are
Django==2.2.4
django-push-notifications==1.6.1

and the WebPush device info is as below.

send_message_error

Thank you in advance

@azmeuk
Copy link
Member

azmeuk commented Oct 29, 2023

Fixed by #674

@azmeuk azmeuk closed this as completed Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants