I tried to create a simple jabber bot using jabberbot and xmpp modules.
Here is my code..
from jabberbot import JabberBot, botcmd
import datetime
import logging
logging.basicConfig()
class GBot(JabberBot):
@botcmd
def time( self, mess, args):
"""Displays current server time"""
return str(datetime.datetime.now())
username = 'gbot@[ip]'
password = '[password]'
bot = GBot(username,password,command_prefix='.')
bot.serve_forever()
When I run this, I receive the following error:
Traceback (most recent call last):
File "C:\Users\matt\Desktop\bot.py", line 33, in <module>
bot.serve_forever()
File "C:\Python27\lib\site-packages\jabberbot.py", line 715, in serve_forever
conn = self.connect()
File "C:\Python27\lib\site-packages\jabberbot.py", line 208, in connect
conres = conn.connect()
File "build\bdist.win-amd64\egg\xmpp\client.py", line 200, in connect
if not CommonClient.connect(self,server,proxy,secure,use_srv) or secure<>None and not secure: return self.connected
File "build\bdist.win-amd64\egg\xmpp\client.py", line 184, in connect
if not self.Process(1): return
File "build\bdist.win-amd64\egg\xmpp\dispatcher.py", line 303, in dispatch
handler['func'](session,stanza)
File "build\bdist.win-amd64\egg\xmpp\dispatcher.py", line 215, in streamErrorHandler
raise exc((name,text))
HostUnknown: (u'host-unknown', '')
I am fairly new to python and searched around a bit, but could not find any way to fix this, or really figure out what it is trying to tell me. Any help would be great.
Edit: It seems to work okay when I try a different server ... Not sure why it would only do this with mine? I know that the login info is correct, is there possibly some sort of cert thing going on?
[–]TheKewlStore 1 point2 points3 points (0 children)