Try prepending your URL with the protocol. Eg. HTTP:
api = UserService("http://192.xxx.x.xxx:9090/", "SecretKey")
Obviously, you also need to use a valid IP address or host name instead of "192.xxx.x.xxx".
题
I have installed openfire server on my fedora 20 machine, and i am trying to connect and insert a new user with following..
from openfire import UserService
api = UserService("192.xxx.x.xxx:9090/", "SecretKey")
i am getting the following error
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
i have taken reference from this url:
https://github.com/plazix/python-openfire/blob/master/docs/user_service.md
any help would be appreciated!
解决方案
Try prepending your URL with the protocol. Eg. HTTP:
api = UserService("http://192.xxx.x.xxx:9090/", "SecretKey")
Obviously, you also need to use a valid IP address or host name instead of "192.xxx.x.xxx".