XMPP connecting to server (Python) -


i following tutorial/getting started on creating google talk bot

i have made echobot fails @ runtime following error:

file "echobot.py", line 59, in <module> if xmpp.connect(('talk.google.com'), '5222'): file "c:\python31\lib\sleekxmpp\clientxmpp.py", line 143, in connect reattempt=reattempt) file "c:\python31\lib\sleekxmpp\xmlstream\xmlstream.py", line 372, in connect self.address = (host, int(port)) valueerror: invalid literal int() base 10: 'a' 

i have tried python 3,3 , 3,2 , 3,1 interpreter same result.

i can not these lines tutorial compile either of compilers:

if sys.version_info < (3, 0): reload(sys) sys.setdefaultencoding('utf8') 

the code within bot fails follows:

if xmpp.connect(('talk.google.com'), '5222'):     xmpp.process(block=true) else:     print('fekk ikkje kopla til') 

thanks tips/help!

you have written wrong:

xmpp.connect(('talk.google.com', '5222'))                                |                              there missed comma 

and second thing put port second place.

xmpp.connect(('talk.google.com', 5222), '5222') 

i not know of second argument but

internet adresses tuples of (host, port)


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -