Witam,
system operacyjny: linux
model modemu: e3372h-153
Korzystam z gotowego skryptu:
https://github.com/trick77/huawei-hilink-status
Program się nie uruchamia Nie mogę znaleźć rozwiązanie dla poniższego wyjątku:
def call_api(device_ip, token, resource, xml_attribs=True):
headers = {}
if token is not None:
headers = {'__RequestVerificationToken': token}
try:
r = requests.get(url='http://' + device_ip + resource, headers=headers, allow_redirects=False, timeout=(2.0,2.0))
except requests.exceptions.RequestException as e:
print ("Error: "+str(e))
return False;
if r.status_code == 200:
d = xmltodict.parse(r.text, xml_attribs=xml_attribs)
if 'error' in d:
raise Exception('Received error code ' + d['error']['code'] + ' for URL ' + r.url)
return d
else:
raise Exception('Received status code ' + str(r.status_code) + ' for URL ' + r.url)
error
Traceback (most recent call last):
File "./hstatus.py", line 272, in <module>
print_device_info(device_ip, token)
File "./hstatus.py", line 220, in print_device_info
d = call_api(device_ip, token, '/api/device/information')
File "./hstatus.py", line 59, in call_api
raise Exception('Received error code ' + d['error']['code'] + ' for URL ' + r.url)
Exception: Received error code 125002 for URL http://192.168.8.1/api/device/information
Macie może propozycje, jak można rozwiązać powyższy problem?