问题描述
当前,我正在通过发送xmpp消息来测试 appengine-crowdguru-python 来自http://localhost:8000/xmpp
,该表单具有可发布数据的表格..我已经填写了从(至)聊天(消息)字段.
Currently I'm testing appengine-crowdguru-python this app by sending xmpp messages from http://localhost:8000/xmpp
which has a form to post data .. I have filled from, to, chat (message) fields.
From : [email protected]
To : [email protected]
Chat: /tellme Who is Clinton?
其中app-live
app-id当前处于活动状态.我还将字段的ID更改为[email protected]
,其中[email protected]
是通过 https://www.xmpp创建的. .jp/signup ,但仍显示无效的JID.
where app-live
app-id is currently on live. I also changed from and to fields to the ids like [email protected]
where this account is created through https://www.xmpp.jp/signup but it still shows invalid JID..
ERROR 2016-06-06 08:45:32,157 wsgi.py:280]
Traceback (most recent call last):
File "/home/gemini/softwares/google_appengine/google/appengine/runtime/wsgi.py", line 268, in Handle
result = handler(dict(self._environ), self._StartResponse)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 1519, in __call__
response = self._internal_error(e)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/home/gemini/softwares/google_appengine/google/appengine/ext/webapp/xmpp_handlers.py", line 63, in handle_exception
super(BaseHandler, self).handle_exception(exception, debug_mode)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/home/gemini/PycharmProjects/appengine-crowdguru-python/guru.py", line 222, in post
super(XmppHandler, self).post()
File "/home/gemini/softwares/google_appengine/google/appengine/ext/webapp/xmpp_handlers.py", line 73, in post
self.message_received(self.xmpp_message)
File "/home/gemini/softwares/google_appengine/google/appengine/ext/webapp/xmpp_handlers.py", line 118, in message_received
handler(message)
File "/home/gemini/PycharmProjects/appengine-crowdguru-python/guru.py", line 302, in tellme_command
message.reply(WAIT_MSG)
File "/home/gemini/softwares/google_appengine/google/appengine/api/xmpp/__init__.py", line 515, in reply
message_type=message_type, raw_xml=raw_xml)
File "/home/gemini/softwares/google_appengine/google/appengine/api/xmpp/__init__.py", line 346, in send_message
raise InvalidJidError()
InvalidJidError
推荐答案
获取Jid"的常见行为是错误的,如果由于Jid组成(用户@ server/resource)而未定义Resource(在登录阶段).一个完整的jid"包含了Resource的完整信息,因此,如果它为null,则可以具有null指针,因此会出错.
A common behaviour of "get Jid" it's error if Resource (in login phase) it's not definied due to the Jid composition ( user @ server /resource). A "full jid" it's complete of Resource, so if it's null you can have a null pointer and so an error.
如何处理:解决方案1:仅获取裸机ID"
How to handle:SOLUTION 1: retrive just "bare Jid"
解决方案2:定义资源(这是代表您的客户的自定义名称).
SOLUTION 2: define a resource (it's a custom name that represent your client).
希望有帮助.
这篇关于GAE xmpp应用显示无效的JID错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!