How to use wokkel with google talk: (error twisted.words.protocols.jabber.sasl.SASLNoAcceptableMechanism)

643 Views Asked by At

I tried the answer given here. Looked up the problem here, and found something to indicate this is completely hopeless here

I have already tried upgrading my openssl (macports) and tried installing pyopenssl (macports.) Although I have had problems with macports before, I have had success with xmpppy and sleekxmpp. Hence, I have to wonder whether there is some kind of incompatibility between wokkel and google talk (as suggested in the third link.) This seems odd to me since google talk is (as far as I know) a very popular medium of communication.

My question is simply whether anyone has successfully gotten wokkel working with google talk since 2008, and if so, how?

This is what I have:

from twisted.words.xish import domish
from wokkel.xmppim import MessageProtocol, AvailablePresence

class EchoBotProtocol(MessageProtocol):
  def connectionMade(self):
      print "Connected!"

      # send initial presence
      self.send(AvailablePresence())

  def connectionLost(self, reason):
      print "Disconnected!"

  def onMessage(self, msg):
      print str(msg)

      if msg["type"] == 'chat' and hasattr(msg, "body"):
          reply = domish.Element((None, "message"))
          reply["to"] = msg["from"]
          reply["from"] = msg["to"]
          reply["type"] = 'chat'
          reply.addElement("body", content="echo: " + str(msg.body))

          self.send(reply)

from twisted.application import service
from twisted.words.protocols.jabber import jid
from wokkel.client import XMPPClient

application = service.Application("echobot")

xmppclient = XMPPClient(jid.internJID("[email protected]/echobot"), "pass")
xmppclient.logTraffic = False
echobot = EchoBotProtocol()
echobot.setHandlerParent(xmppclient)
xmppclient.setServiceParent(application)
1

There are 1 best solutions below

0
On

I was able to solve this issue by installing pyOpenSSL.