Skip to content
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: Invalid backend xmpp #101

Closed
tristan-k opened this issue Sep 2, 2016 · 6 comments
Closed

ERROR: Invalid backend xmpp #101

tristan-k opened this issue Sep 2, 2016 · 6 comments
Labels

Comments

@tristan-k
Copy link

tristan-k commented Sep 2, 2016

$  sudo -H pip install ntfy[XMPP]
Requirement already satisfied (use --upgrade to upgrade): ntfy[XMPP] in /usr/local/lib/python2.7/dist-packages
  ntfy 2.2.0 does not provide the extra 'XMPP'
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/dist-packages (from ntfy[XMPP])
Requirement already satisfied (use --upgrade to upgrade): ruamel.yaml in /usr/local/lib/python2.7/dist-packages (from ntfy[XMPP])
Requirement already satisfied (use --upgrade to upgrade): appdirs in /usr/local/lib/python2.7/dist-packages (from ntfy[XMPP])
Requirement already satisfied (use --upgrade to upgrade): ruamel.ordereddict in /usr/local/lib/python2.7/dist-packages (from ruamel.yaml->ntfy[XMPP])
Requirement already satisfied (use --upgrade to upgrade): typing in /usr/local/lib/python2.7/dist-packages (from ruamel.yaml->ntfy[XMPP])
$ ntfy -v -b xmpp send 'XMPP test!'
ERROR: Invalid backend xmpp
$ cat  ~/.config/ntfy/ntfy.yml

---
backends:
        - xmpp
xmpp:
        jid: "ntfy@domain.tld"
        password: "XXXXXXX"
        hostname: "domain.tld"
        port: "62285"
        mtype: "chat"
        recipient: "receiver@domain.tld"

@danryder Am I missing something?

@dschep
Copy link
Owner

dschep commented Sep 2, 2016

You got the extra name wrong:

  ntfy 2.2.0 does not provide the extra 'XMPP'

try: sudo pip install ntfy[xmpp] (lowercase)

@dschep dschep closed this as completed Sep 2, 2016
@dschep dschep added the question label Sep 2, 2016
@tristan-k
Copy link
Author

tristan-k commented Sep 2, 2016

Thanks. I don't know if this is related to my distribution or to ntfy, but I'm getting errors. Should I open another issue?

$ sudo -H pip install ntfy[xmpp]
Requirement already satisfied (use --upgrade to upgrade): ntfy[xmpp] in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/dist-packages (from ntfy[xmpp])
Requirement already satisfied (use --upgrade to upgrade): ruamel.yaml in /usr/local/lib/python2.7/dist-packages (from ntfy[xmpp])
Requirement already satisfied (use --upgrade to upgrade): appdirs in /usr/local/lib/python2.7/dist-packages (from ntfy[xmpp])
Collecting sleekxmpp; extra == "xmpp" (from ntfy[xmpp])
  Downloading sleekxmpp-1.3.1.tar.gz (831kB)
    100% |████████████████████████████████| 839kB 316kB/s 
Collecting dnspython3; extra == "xmpp" (from ntfy[xmpp])
  Downloading dnspython3-1.12.0.zip (226kB)
    100% |████████████████████████████████| 235kB 1.1MB/s 
Requirement already satisfied (use --upgrade to upgrade): ruamel.ordereddict in /usr/local/lib/python2.7/dist-packages (from ruamel.yaml->ntfy[xmpp])
Requirement already satisfied (use --upgrade to upgrade): typing in /usr/local/lib/python2.7/dist-packages (from ruamel.yaml->ntfy[xmpp])
Building wheels for collected packages: sleekxmpp, dnspython3
  Running setup.py bdist_wheel for sleekxmpp ... done
  Stored in directory: /root/.cache/pip/wheels/f8/cb/9b/139c881b51a72f4ef36fb7774e09d595d833e50411ce4d45d4
  Running setup.py bdist_wheel for dnspython3 ... done
  Stored in directory: /root/.cache/pip/wheels/79/2c/6c/faede23a9147578cb2272bf6aa26607d3ac9b45231a9d8016e
Successfully built sleekxmpp dnspython3
Installing collected packages: sleekxmpp, dnspython3
Successfully installed dnspython3-1.12.0 sleekxmpp-1.3.1
Traceback (most recent call last):
  File "/usr/local/bin/ntfy", line 7, in <module>
    from ntfy.cli import main
  File "/usr/local/lib/python2.7/dist-packages/ntfy/__init__.py", line 27, in <module>
    module = import_module('ntfy.backends.{}'.format(k))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/ntfy/backends/xmpp.py", line 3, in <module>
    import sleekxmpp
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/__init__.py", line 20, in <module>
    from sleekxmpp.stanza import Message, Presence, Iq
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/stanza/__init__.py", line 10, in <module>
    from sleekxmpp.stanza.error import Error
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/stanza/error.py", line 9, in <module>
    from sleekxmpp.xmlstream import ElementBase, ET
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/xmlstream/__init__.py", line 14, in <module>
    from sleekxmpp.xmlstream.xmlstream import XMLStream, RESPONSE_TIMEOUT
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/xmlstream/xmlstream.py", line 40, in <module>
    from sleekxmpp.xmlstream.resolver import resolve, default_resolver
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/xmlstream/resolver.py", line 37, in <module>
    import dns.resolver
  File "/usr/local/lib/python2.7/dist-packages/dns/resolver.py", line 35, in <module>
    import dns.message
  File "/usr/local/lib/python2.7/dist-packages/dns/message.py", line 191
    print('id %d' % self.id, file=s)
                                 ^
SyntaxError: invalid syntax
$ ntfy -v -b xmpp send 'XMPP test!'
Traceback (most recent call last):
  File "/usr/local/bin/ntfy", line 7, in <module>
    from ntfy.cli import main
  File "/usr/local/lib/python2.7/dist-packages/ntfy/__init__.py", line 27, in <module>
    module = import_module('ntfy.backends.{}'.format(k))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/ntfy/backends/xmpp.py", line 3, in <module>
    import sleekxmpp
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/__init__.py", line 20, in <module>
    from sleekxmpp.stanza import Message, Presence, Iq
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/stanza/__init__.py", line 10, in <module>
    from sleekxmpp.stanza.error import Error
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/stanza/error.py", line 9, in <module>
    from sleekxmpp.xmlstream import ElementBase, ET
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/xmlstream/__init__.py", line 14, in <module>
    from sleekxmpp.xmlstream.xmlstream import XMLStream, RESPONSE_TIMEOUT
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/xmlstream/xmlstream.py", line 40, in <module>
    from sleekxmpp.xmlstream.resolver import resolve, default_resolver
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/xmlstream/resolver.py", line 37, in <module>
    import dns.resolver
  File "/usr/local/lib/python2.7/dist-packages/dns/resolver.py", line 35, in <module>
    import dns.message
  File "/usr/local/lib/python2.7/dist-packages/dns/message.py", line 191
    print('id %d' % self.id, file=s)
                                 ^
SyntaxError: invalid syntax

@dschep
Copy link
Owner

dschep commented Sep 2, 2016

Hmm.. It installed dnspython3 even tho it seems to be installing for python2. Not sure how to make it not do that.. but to fix it: sudo pip uninstall dnspython3 && sudo pip install dnspython.

@tristan-k
Copy link
Author

That solved it. But for some reasons pyasn1 isnt picked up.

ntfy -b xmpp send 'XMPP test!'
WARNING: Could not find pyasn1 and pyasn1_modules. SSL certificate COULD NOT BE VERIFIED.
WARNING: Could not find pyasn1 and pyasn1_modules. SSL certificate expiration COULD NOT BE VERIFIED.
$ sudo -H pip install pyasn1
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /usr/lib/python2.7/dist-packages

@tristan-k
Copy link
Author

tristan-k commented Sep 2, 2016

I mean it still isnt recognized by ntfy after doing $ sudo -H pip install pyasn1.

@dschep
Copy link
Owner

dschep commented Sep 2, 2016

Oh.. weird

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants