-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Error 500 object has no attribute 'encode' #225
Comments
same here @maudrid did you find any solution? |
|
Hi @SavvyEngineer
This was quite some time ago and if I recall I was able to get around the
issue, but I really dont remember how.You are on the right track with the
index error. It has to do with the app name. On my PC I see my files are
on branch 2.x, I'm using docker compose to start it.
I have 1 successful app added.
```
desktop:~/work/airnotifier$ docker-compose ps
Name Command State Ports
…-------------------------------------------------------------------------------
airnotifier /bin/sh -c /airnotifier/st ... Up 0.0.0.0:8801->8801/tcp
mongodb docker-entrypoint.sh mongo ... Up 0.0.0.0:27017
->27017/tcp
```
```
desktop:~/work/airnotifier$ git status
On branch 2.x
Your branch is up to date with 'origin/2.x'.
```
On Sat, Jun 26, 2021 at 10:16 PM SavvyEngineer ***@***.***> wrote:
[I 210626 20:14:56 dao:25] find token:
fduxKoZZRiSp39kCYLHNKz:APA91bFv-C88mkeQyQvLC92UyGuvnalXj3F4K_i7oJPx1h5It6EelKs-1fhnHCd1zGlG07Zy_5wJs5x_rWk7hHe37SV-ZAvMUroTzpSB5GgHbsR4t4TCP9vLgA2P-_Q7-Xf5Q0Pnzqf-
[I 210626 20:14:56 push:111] sending notification to fcm:
fduxKoZZRiSp39kCYLHNKz:APA91bFv-C88mkeQyQvLC92UyGuvnalXj3F4K_i7oJPx1h5It6EelKs-1fhnHCd1zGlG07Zy_5wJs5x_rWk7hHe37SV-ZAvMUroTzpSB5GgHbsR4t4TCP9vLgA2P-_Q7-Xf5Q0Pnzqf-
[E 210626 20:14:56 push:177] Traceback (most recent call last):
File "/root/airnotifier/api/push.py", line 116, in post
fcmconn = self.fcmconnections[self.app["shortname"]][0]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/airnotifier/api/push.py", line 119, in post
statuscode = ex.code
AttributeError: 'IndexError' object has no attribute 'code'
'IndexError' object has no attribute 'code'
[E 210626 20:14:56 web:2242] 500 POST /api/v2/push (178.173.152.3) 16.97ms
[I 210626 20:14:56 *init*:217] PushHandler call ends 0.016781330108642578
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJQ64ZW5J5QKERMA34TTTLTUYYQVANCNFSM4UHXQLRA>
.
|
@maudrid thanks for the reply I found out that I was using my firebase server key in Firebase Cloud Messaging settings and it was wrong then I looked back in the Docs of Installation 3.x and I found out that I had to do it this way |
❓ Question
AirNotifier 2.x
Hi there.
I'm getting an error when using the push API.
The message is still pushed and arrives at the destination, but the API Response is 500.
Here is a debug log:
Any idea what this may be?
The text was updated successfully, but these errors were encountered: