python slimxmpp ping错误
Posted
技术标签:
【中文标题】python slimxmpp ping错误【英文标题】:python sleekxmpp ping error 【发布时间】:2014-02-18 04:31:06 【问题描述】:当我从 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
我正在运行 slimxmpp 1.1.11。有人能解释一下吗?
【问题讨论】:
【参考方案1】:ping
方法是在this commit中添加的,最早出现在ssleekxmpp 1.2.0版本中。
【讨论】:
升级到 slimxmpp 1.2.4。现在它甚至不会进行身份验证。给出 CERT 错误。 这应该是第二个问题。我已经为你准备好了答案。以上是关于python slimxmpp ping错误的主要内容,如果未能解决你的问题,请参考以下文章
如何在 slimxmpp python 中为 gcm ccs 请求创建 xmpp 节?
尝试使用 slimxmpp 连接 FCM CCS 服务器时出错