FalkTannhaeuser / python-onvif-zeep

ONVIF Client Implementation in Python 2+3 (using https://github.com/mvantellingen/python-zeep instead of suds as SOAP client)
MIT License
420 stars 137 forks source link

Unknowerror that occurs when operating PTZ camera movement #86

Open LanguageFlowCho opened 2 years ago

LanguageFlowCho commented 2 years ago

Hi when running python code This is an error that occurs, I checked the error message and thought it was a camera password problem, but it is not. Could you please explain what kind of error this is?

The error statement is this

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/onvif_zeep-0.2.12-py3.6.egg/onvif/client.py", line 25, in wrapped return func(*args, kwargs) File "/usr/local/lib/python3.6/dist-packages/onvif_zeep-0.2.12-py3.6.egg/onvif/client.py", line 150, in wrapped return call(params, callback) File "/usr/local/lib/python3.6/dist-packages/onvif_zeep-0.2.12-py3.6.egg/onvif/client.py", line 138, in call ret = func(params) File "/home/cho/.local/lib/python3.6/site-packages/zeep/proxy.py", line 51, in call kwargs, File "/home/cho/.local/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 135, in send return self.process_reply(client, operation_obj, response) File "/home/cho/.local/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 229, in process_reply return self.process_error(doc, operation) File "/home/cho/.local/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 396, in process_error subcodes=subcodes, zeep.exceptions.Fault: The security token could not be authenticated or authorized

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "test1.py", line 151, in setup_move() File "test1.py", line 92, in setup_move media_profile = media.GetProfiles()[0] File "/usr/local/lib/python3.6/dist-packages/onvif_zeep-0.2.12-py3.6.egg/onvif/client.py", line 27, in wrapped raise ONVIFError(err) onvif.exceptions.ONVIFError: Unknown error: The security token could not be authenticated or authorized

I can't figure out if this error is a code problem or a hardware problem.

Good luck.

ibkim commented 2 years ago

Hi All,

I have same problem. Any information?

LanguageFlowCho commented 2 years ago

hi In my case, it was a simple code error. Refactoring the code to find the problem.

leemengwei commented 2 years ago

hi In my case, it was a simple code error. Refactoring the code to find the problem.

Could you explain more ? thanks in advance!

LanguageFlowCho commented 1 year ago

Sorry for the delay. As a result of what I checked, there are cases where the camera does not give a security token, not a code problem. In my case, I checked the camera, but each camera manufacturer has different characteristics, so I can't tell you what's important, but it was a hardware problem. I hope the problem is resolved.