python sleekxmpp ping错误

时间:2014-02-18 04:31:07

标签: python xmpp ping

当我从github运行ping示例时,我得到了AttributeError

INFO     Negotiating TLS
INFO     Using SSL version: 1
INFO     Node set to: beast@home-server/50182ab4
INFO     CERT: Time until certificate expiration: 1635 days, 15:10:17.248035
INFO     Waiting for </stream:stream> from server
ERROR    Error processing event handler: <bound method PingTest.start of <__main__.PingTest object at 0x12cded0>>
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/xmlstream/xmlstream.py", line 1659, in _event_runner
    func(*args)
  File "sleekxmpp_ping.py", line 67, in start
    rtt = self['xep_0199'].ping(self.pingjid, timeout=10)
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/plugins/base.py", line 304, in __getattr__
    return object.__getattribute__(self, key)
AttributeError: 'XEP_0199' object has no attribute 'ping'
ERROR    'XEP_0199' object has no attribute 'ping'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/xmlstream/xmlstream.py", line 1659, in _event_runner
    func(*args)
  File "sleekxmpp_ping.py", line 67, in start
    rtt = self['xep_0199'].ping(self.pingjid, timeout=10)
  File "/usr/local/lib/python2.7/dist-packages/sleekxmpp/plugins/base.py", line 304, in __getattr__
    return object.__getattribute__(self, key)
AttributeError: 'XEP_0199' object has no attribute 'ping'
Done

我正在运行sleekxmpp 1.1.11。任何人都有所了解?

1 个答案:

答案 0 :(得分:0)

this commit中添加了ping方法,并首次出现在sleekxmpp版本1.2.0中。