[PyXMPP] run error for send_message_client.py

li donglin lidonglin8088 at gmail.com
Thu Sep 22 14:39:06 CEST 2011


hi,
     I downloaded src code of pyxmpp2 and run send_message_client.py for
test. I got error. does anyone can help me?
     I changed send_message_client.py line 56 as follow:
     settings = XMPPSettings({
                            u"password": your_password,
                            u"starttls": True,
                            u"tls_verify_peer": False,
                            u"server":"60.216.4.132", ## added myself
                        })

------------------------------------------------------------------------------------------------------------------------
send_message_client.py
Your jid: xxx at inspurworld.com
Your password:
Target jid: yyy at inspurworld.com
Message: hello
INFO:root:-- Connecting to 60.216.4.132:5222...
INFO:root:-- Connected to 60.216.4.132:5222
INFO:root:-- Connected to inspurworld.com
INFO:root:-- Got stream features
INFO:root:-- TLS connecting
INFO:root:-- TLS connected to <unknown> using AES256-SHA cipher TLSv1/SSLv3
(256
 bits)
INFO:root:-- Connected to inspurworld.com
INFO:root:-- Got stream features
Traceback (most recent call last):
  File "send_message_client.py", line 64, in <module>
    client.run()
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\cl
ient.py", line 216, in run
    self.main_loop.loop(timeout)
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\ma
inloop\base.py", line 86, in loop
    self.loop_iteration(interval)
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\ma
inloop\select.py", line 77, in loop_iteration
    handler.handle_read()
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\tr
ansport.py", line 738, in handle_read
    self._feed_reader(data)
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\tr
ansport.py", line 849, in _feed_reader
    self._reader.feed(data)
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\xm
ppparser.py", line 212, in feed
    self.parser.feed(data)
  File "C:\Python27\lib\xml\etree\ElementTree.py", line 1622, in feed
    self._parser.Parse(data, 0)
  File "C:\Python27\lib\xml\etree\ElementTree.py", line 1531, in _end
    return self.target.end(self._fixname(tag))
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\xm
ppparser.py", line 158, in end
    self._handler.stream_element(element)
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\st
reambase.py", line 367, in stream_element
    self._process_element(element)
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\st
reambase.py", line 500, in _process_element
    handled = handler(self, element)
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\st
reamsasl.py", line 214, in _process_sasl_challenge
    ret = self.authenticator.challenge(a2b_base64(content))
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\sa
sl\digest_md5.py", line 292, in challenge
    return self._make_response(charset, realms, nonce)
  File
"C:\Python27\lib\site-packages\pyxmpp2-2.0alpha2_git-py2.7.egg\pyxmpp2\sa
sl\digest_md5.py", line 345, in _make_response
    host = host.encode("idna")
AttributeError: 'NoneType' object has no attribute 'encode'
---------------------------------------------------------------------------------------------------------------------------
-- 
li donglin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jajcus.net/pipermail/pyxmpp/attachments/20110922/8aefff63/attachment.html>


More information about the PyXMPP mailing list