dschep / ntfy

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

Telegram first run doesn't work, Invalid backend #165

Open jinnatar opened 6 years ago

jinnatar commented 6 years ago

Installed 2.5.1 as:

%> sudo -H pip install 'ntfy[telegram,emoji]'

Trying to run as per docs:

%> ntfy -b telegram send "hello world"
ERROR: Invalid backend telegram

My .config/ntfy/ntfy.yml is very simple, removing it does not help nor does adding telegram to the backends list or adding an empty telegram config block:

backends:
  - pushover
pushover:
  user_key: FOO

Installed on Ubuntu LTS 16.04, python2.7

%> python -V
Python 2.7.12
dschep commented 6 years ago

I didn't write or use the telegram backend so I don't really know. Thoughts @rahiel?

rahiel commented 6 years ago

I can't reproduce this. I don't have a .config/ntfy/ntfy.yml and did a clean install of ntfy[telegram,emoji] on python 2.7 and it works.

@Artanicus maybe try uninstalling ntfy and installing it on Python3? (So use pip3 instead)

jinnatar commented 6 years ago

Python3 install seems to work. Any ideas why a 2.7 install would fail?

rahiel commented 6 years ago

Maybe you have more stuff installed in your 2.7 environment, so some modules may clash. And I guess your Python3 environment is clean, i.e. you haven't installed (much) with pip3.

Don't forget to close this issue.

ne0c0de commented 6 years ago

same issue here, did you find a workaround @Artanicus ?

(I tried to install with both pip and pip3 non of them worked)

@rahiel how can i debug it?

btw these are the commands that i executed after installation:

Successfully installed ntfy appdirs ruamel.yaml
Cleaning up...
root@appserver2:~# pip3 install ntfy[telegram]
Requirement already satisfied (use --upgrade to upgrade): ntfy[telegram] in /usr/local/lib/python3.4/dist-packages
  Installing extra requirements: 'telegram'
Cleaning up...
root@appserver2:~# ntfy -b telegram send "Telegram configured for ntfy"
ERROR: Invalid backend telegram
root@appserver2:~#
slavaGanzin commented 6 years ago

@rahiel in my setup(python3) telegram_send stop working. ntfy-telegram backend just show generic error. But i tried to use telegram-send from cli and it shows it doesn't have some dependencies: future, chardet in my case.

I reinstall all telegram_send dependencies by hand and ntfy-telegram starts to work. So it's not a problem with ntfy code it's problem with dependencies of a dependency.