Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

donationalerts.Alert not working #13

@Icold21

Description

@Icold21

I have the python code there:

from donationalerts import Alert

load_dotenv('source/key/DA_token.env')
DA_token = os.environ.get("DA_token")

alert = Alert(DA_token)

@alert.event()
def on_message(event):
    print('=')

And after donate i got this error:

Exception in thread Thread-9 (_handle_eio_message):
Traceback (most recent call last):
File "C:\Users\Icold\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Users\Icold\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Icold\AppData\Local\Programs\Python\Python311\Lib\site-packages\socketio\client.py", line 512, in _handle_eio_message
self._handle_event(pkt.namespace, pkt.id, pkt.data)
File "C:\Users\Icold\AppData\Local\Programs\Python\Python311\Lib\site-packages\socketio\client.py", line 386, in _handle_event
r = self._trigger_event(data[0], namespace, *data[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Icold\AppData\Local\Programs\Python\Python311\Lib\site-packages\socketio\client.py", line 434, in _trigger_event
return handler(*args)
^^^^^^^^^^^^^^
File "C:\Users\Icold\AppData\Local\Programs\Python\Python311\Lib\site-packages\donationalerts\donationalerts.py", line 255, in on_message
data["header"],
~~~~^^^^^^^^^^
KeyError: 'header'

I should got "=" in my console. I don't understand what did I do wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions