dschep / ntfy

🖥️📱🔔 A utility for sending notifications, on demand and when commands finish.
http://ntfy.rtfd.io
GNU General Public License v3.0
4.84k stars 213 forks source link

Issue with using telegram backend #276

Open Pigrenok opened 2 months ago

Pigrenok commented 2 months ago

I installed ntfy with telegram backend:

pip install ntfy[telegram]

but when I do the first run, I get a strange errors:

ntfy -b telegram -v -l DEBUG send "Telegram configured for ntfy"
Follow the instructions to configure the Telegram backend.

/home/pigrenok/.pyenv/versions/3.10.9/lib/python3.10/site-packages/ntfy/backends/telegram.py:17: RuntimeWarning: coroutine 'configure' was never awaited
  configure(config_file)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/home/pigrenok/.pyenv/versions/3.10.9/lib/python3.10/site-packages/ntfy/backends/telegram.py:18: RuntimeWarning: coroutine 'send' was never awaited
  send(messages=[message], conf=config_file)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

At the same time telegram-send has configured and working fine.

What is the issue? Is it a bug or do I do something wrong?

Thanks.

Strykar commented 1 month ago

Yep, same issue here.

$ ntfy -b telegram send test 
Follow the instructions to configure the Telegram backend.

/usr/lib/python3.12/site-packages/ntfy/backends/telegram.py:17: RuntimeWarning: coroutine 'configure' was never awaited
  configure(config_file)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/python3.12/site-packages/ntfy/backends/telegram.py:18: RuntimeWarning: coroutine 'send' was never awaited
  send(messages=[message], conf=config_file)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback