nms Scripts python exe Python nms nms main py DEBUG nms nms_core base_

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
D:\nms\Scripts\python.exe D:/Python/nms/nms/main.py
DEBUG:nms.nms_core.base_api:{"request": {"object": "station", "action": "traffic-extended", "id": "1957", "from": 1589886720, "to": 1589887321}}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.150.107:80
DEBUG:urllib3.connectionpool:http://192.168.150.107:80 "GET /jsonapi/?token=xxx&out=json HTTP/1.1" 200 None
Traceback (most recent call last):
File "D:/Python/nms/nms/main.py", line 29, in <module>
main()
File "D:/Python/nms/nms/main.py", line 21, in main
print(api.trafic_extended(id='1957', start=datetime.now().replace(minute=12, second=0), stop=datetime.now()))
File "D:\Python\nms\nms\nms_core\api.py", line 91, in trafic_extended
return self._nms_request(body=body, result_class=result_class)
File "D:\Python\nms\nms\nms_core\api.py", line 42, in _nms_request
if response and response.data:
AttributeError: 'dict' object has no attribute 'data'