smartsenselab/sensecam-control

onvif.exceptions.ONVIFError: Unknown error: HTTPConnectionPool

Opened this issue · 1 comments

I'm running the example_control_onvif with rtsp and it show
onvif.exceptions.ONVIFError: Unknown error: HTTPConnectionPool(host='192.168.150.155', port=80): Max retries exceeded with url: /onvif/device_service (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4d42d2f860>: Failed to establish a new connection: [Errno 113] No route to host',))

I don't know whether the configuration I did is correct, can you help me to configure, such as which line should I change?

after I try change the ip in example, now it show error like this

Traceback (most recent call last):
File "/home/otka/.local/lib/python3.6/site-packages/suds/transport/http.py", line 78, in send
fp = self.u2open(u2request)
File "/home/otka/.local/lib/python3.6/site-packages/suds/transport/http.py", line 119, in u2open
return url.open(u2request, timeout=tm)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/otka/.local/lib/python3.6/site-packages/suds/client.py", line 652, in send
reply = transport.send(request)
File "/home/otka/.local/lib/python3.6/site-packages/suds/transport/http.py", line 178, in send
return HttpTransport.send(self, request)
File "/home/otka/.local/lib/python3.6/site-packages/suds/transport/http.py", line 86, in send
raise TransportError(e.msg, e.code, e.fp)
suds.transport.TransportError: Unauthorized

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/otka/.local/lib/python3.6/site-packages/onvif/client.py", line 34, in wrapped
return func(*args, **kwargs)
File "/home/otka/.local/lib/python3.6/site-packages/onvif/client.py", line 201, in wrapped
return call(params, callback)
File "/home/otka/.local/lib/python3.6/site-packages/onvif/client.py", line 191, in call
ret = func(**params)
File "/home/otka/.local/lib/python3.6/site-packages/suds/client.py", line 559, in call
return client.invoke(args, kwargs)
File "/home/otka/.local/lib/python3.6/site-packages/suds/client.py", line 618, in invoke
result = self.send(soapenv)
File "/home/otka/.local/lib/python3.6/site-packages/suds/client.py", line 664, in send
result = self.failed(binding, e)
File "/home/otka/.local/lib/python3.6/site-packages/suds/client.py", line 726, in failed
raise Exception((status, reason))
Exception: (401, 'Unauthorized')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/otka/venv1/sensecam-control-master/example_control_onvif.py", line 70, in
X.camera_start()
File "/home/otka/venv1/sensecam-control-master/sensecam_control/onvif_control.py", line 42, in camera_start
media_profile = media.GetProfiles()[0]
File "/home/otka/.local/lib/python3.6/site-packages/onvif/client.py", line 36, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: (401, 'Unauthorized')