caronc / apprise-api

A lightweight REST framework that wraps the Apprise Notification Library
https://hub.docker.com/r/caronc/apprise
MIT License
580 stars 50 forks source link

`SCHEMA_MAP` error #89

Closed martadinata666 closed 1 year ago

martadinata666 commented 1 year ago

:beetle: Describe the bug Cant send notification on apprise 1.0.0, discord

:bulb: Screenshots and Logs

AttributeError: module 'apprise.plugins' has no attribute 'SCHEMA_MAP'
apprise_notify.1.v9yigu7we652@homelab    | 10.0.4.4 - - [07/Aug/2022:12:34:42 +0700] "POST /notify/ HTTP/1.1" 500 145 "-" "curl/7.74.0" "-"
apprise_notify.1.v9yigu7we652@homelab    | 2022-08-07 00:34:50,229 [ERROR] django.request: Internal Server Error: /notify/
apprise_notify.1.v9yigu7we652@homelab    | Traceback (most recent call last):
apprise_notify.1.v9yigu7we652@homelab    |   File "/home/debian/.local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
apprise_notify.1.v9yigu7we652@homelab    |     response = get_response(request)
apprise_notify.1.v9yigu7we652@homelab    |   File "/home/debian/.local/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
apprise_notify.1.v9yigu7we652@homelab    |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
apprise_notify.1.v9yigu7we652@homelab    |   File "/home/debian/.local/lib/python3.9/site-packages/django/views/generic/base.py", line 103, in view
apprise_notify.1.v9yigu7we652@homelab    |     return self.dispatch(request, *args, **kwargs)
apprise_notify.1.v9yigu7we652@homelab    |   File "/home/debian/.local/lib/python3.9/site-packages/django/utils/decorators.py", line 46, in _wrapper
apprise_notify.1.v9yigu7we652@homelab    |     return bound_method(*args, **kwargs)
apprise_notify.1.v9yigu7we652@homelab    |   File "/home/debian/.local/lib/python3.9/site-packages/django/utils/decorators.py", line 133, in _wrapped_view
apprise_notify.1.v9yigu7we652@homelab    |     response = view_func(request, *args, **kwargs)
apprise_notify.1.v9yigu7we652@homelab    |   File "/home/debian/.local/lib/python3.9/site-packages/django/views/decorators/cache.py", line 62, in _wrapped_view_func
apprise_notify.1.v9yigu7we652@homelab    |     response = view_func(request, *args, **kwargs)
apprise_notify.1.v9yigu7we652@homelab    |   File "/home/debian/.local/lib/python3.9/site-packages/django/views/generic/base.py", line 142, in dispatch
apprise_notify.1.v9yigu7we652@homelab    |     return handler(request, *args, **kwargs)
apprise_notify.1.v9yigu7we652@homelab    |   File "/home/debian/apprise/apprise_api/api/views.py", line 913, in post
apprise_notify.1.v9yigu7we652@homelab    |     apprise.plugins.SCHEMA_MAP[name].enabled = False

:computer: Your System Details:

:crystal_ball: Additional context

caronc commented 1 year ago

@martadinata666 Thank you for pointing this out. It's a bit embarrassing that i missed this. :astonished:

I created a new release which includes the update to handle the changes in Apprise (from v0.9.9 to -> v1.0.0) where this legacy SCHEMA_MAP dictionary has been renamed and re-factored into another part of the code.

Things should work better now. :rocket:

martadinata666 commented 1 year ago

Thanks, it work properly now 🎉