我是python和api的新手,我有一个openNMS服务器正在运行,我需要获取其上的所有节点。我看透了https://pypi.python.org/pypi/opennms-client/0.3,我尝试使用它..但模块len(c.get_nodes())
给我错误说
http://localhost:8980 (admin) <Response [200]>
Traceback (most recent call last):
File "opennms.py", line 11, in <module>
k = c.get_nodes()
File "/usr/local/lib/python2.7/dist-packages/opennms_client/opennms_client.py", line 99, in get_nodes
response = self.__request__(url).json()
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 805, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
有人可以指导吗?