Skip to content

Conversation

@Ppjet6
Copy link
Contributor

@Ppjet6 Ppjet6 commented Apr 21, 2020

Removes redis (mocked) and wsgiref (seems unused). Update sleekxmpp to slixmpp (which is already used in the repo)

Ppjet6 added 3 commits April 21, 2020 17:47
Signed-off-by: Maxime “pep” Buquet <[email protected]>
Signed-off-by: Maxime “pep” Buquet <[email protected]>
Signed-off-by: Maxime “pep” Buquet <[email protected]>
Copy link

@horazont horazont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested.

@agnauck
Copy link
Contributor

agnauck commented Jun 3, 2020

I was testing this branch, but it does not work. I am always getting exceptions when memberbot is processing the initial chat and tries to send the reply.

I assume there are more changes required to make it compatible with slixmpp.

SEND: <iq id="7f621f41-3539-4416-bf6d-e688d9f50709-15" to="[email protected]/gajim.ZV7K69RF" type="get"><query xmlns="http://jabber.org/protocol/disco#info" /></iq>
2020-06-03 13:18:31,250 DEBUG    SEND: <message xml:lang="en" to="[email protected]/gajim.ZV7K69RF" type="error" id="d1ceb1de-0c12-40be-bc15-c9376d68b2aa"><error type="cancel"><undefined-condition xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Slixmpp got into trouble.</text></error></message>
2020-06-03 13:18:31,250 ERROR    Error handling {jabber:client}message stanza
Traceback (most recent call last):
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/api.py", line 133, in run
    return handler(jid, node, ifrom, args)
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/plugins/xep_0115/static.py", line 73, in supports
    info = self.disco._wrap(ifrom, jid, info, True)
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/plugins/xep_0030/disco.py", line 780, in _wrap
    iq.append(payload)
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/xmlstream/stanzabase.py", line 1170, in append
    raise TypeError
TypeError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/xmlstream/xmlstream.py", line 796, in event
    handler_callback(data)
  File "/mnt/c/Code/XSF/memberbot-v2/memberbot/memberbot/chat_voting.py", line 33, in on_message
    session.process(msg['body'], )
  File "/mnt/c/Code/XSF/memberbot-v2/memberbot/memberbot/chat_voting.py", line 55, in process
    self._session.send(user_resp)
  File "/mnt/c/Code/XSF/memberbot-v2/memberbot/memberbot/chat_voting.py", line 64, in _process
    self.send('welcome')
  File "/mnt/c/Code/XSF/memberbot-v2/memberbot/memberbot/chat_voting.py", line 361, in send
    if self.xmpp['xep_0030'].supports(self.user, feature='http://jabber.org/protocol/chatstates'):
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/plugins/xep_0030/disco.py", line 262, in supports
    return self.api['supports'](jid, node, ifrom, data)
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/api.py", line 35, in partial
    return self.api.run(self.name, attr, jid, node, ifrom, args)
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/api.py", line 137, in run
    return handler(jid, node, args)
TypeError: supports() missing 1 required positional argument: 'data'
2020-06-03 13:18:31,252 ERROR    supports() missing 1 required positional argument: 'data'
Traceback (most recent call last):
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/api.py", line 133, in run
    return handler(jid, node, ifrom, args)
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/plugins/xep_0115/static.py", line 73, in supports
    info = self.disco._wrap(ifrom, jid, info, True)
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/plugins/xep_0030/disco.py", line 780, in _wrap
    iq.append(payload)
  File "/home/alex/.local/lib/python3.6/site-packages/slixmpp/xmlstream/stanzabase.py", line 1170, in append
    raise TypeError
TypeError

@agnauck
Copy link
Contributor

agnauck commented Jun 12, 2020

I think we can close this PR
@dwd included the relevant changes in his latest PR and fixed the issues I mentioned above at the same time.
Any concerns? @Ppjet6 @dwd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants