我已经在我的fedora 20机器上安装了openfire服务器,我正在尝试连接并插入一个具有以下内容的新用户..
from openfire import UserService
api = UserService("192.xxx.x.xxx:9090/", "SecretKey")
我收到以下错误
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/python_openfire-0.2.3_beta-py2.7.egg/openfire/user_service.py", line 60, in add_user
'groups': groups_str,
File "/usr/lib/python2.7/site-packages/python_openfire-0.2.3_beta-py2.7.egg/openfire/base.py", line 34, in _submit_request
raise HTTPException(e.reason)
openfire.exception.HTTPException: unknown url type: 192.xxx.x.xxx
我参考了这个网址:
https://github.com/plazix/python-openfire/blob/master/docs/user_service.md
任何帮助将不胜感激!
答案 0 :(得分:0)
尝试使用协议预先添加您的网址。例如。 HTTP:
api = UserService("http://192.xxx.x.xxx:9090/", "SecretKey")
显然,您还需要使用有效的IP地址或主机名,而不是&#34; 192.xxx.x.xxx&#34;。