python-onvif-zeep icon indicating copy to clipboard operation
python-onvif-zeep copied to clipboard

ONVIFError: Unknown error: Sender Not Authorized

Open bebenoz opened this issue 6 years ago • 9 comments

Dear Mr. FalkTannhaeuser.

Thanks for the great implementation of ONVIF camera. I am currently using your implementation with a SNP-6320H ONVIF compliant camera. As I was trying to run some of your example code, the following error occured:

runfile('C:/Users/Bulut/Desktop/streaming.py', wdir='C:/Users/Bulut/Desktop') Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/Bulut/Desktop/streaming.py', wdir='C:/Users/Bulut/Desktop')

File "C:\Users\Bulut\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile execfile(filename, namespace)

File "C:\Users\Bulut\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/Bulut/Desktop/streaming.py", line 65, in media_profile_configuration()

File "C:/Users/Bulut/Desktop/streaming.py", line 22, in media_profile_configuration profiles = media_service.GetProfiles()

File "C:\Users\Bulut\AppData\Local\Continuum\anaconda3\lib\site-packages\onvif_zeep-0.2.12-py3.7.egg\onvif\client.py", line 26, in wrapped raise ONVIFError(err)

ONVIFError: Unknown error: Sender Not Authorized

Could you please help me with that? Thanks in advance.

bebenoz avatar Apr 04 '19 11:04 bebenoz

have you enabled onvif and created a administrator user in your camera ?

bmabir17 avatar Jul 22 '19 12:07 bmabir17

Yes, I have, I am using AXIS Q3515-LV camera. I have created an admin user in the onvif setting.

  File "/home/avgusr/env/lib/python3.8/site-packages/onvif/client.py", line 23, in wrapped
    return func(*args, **kwargs)
  File "/home/avgusr/env/lib/python3.8/site-packages/onvif/client.py", line 153, in wrapped
    return call(params, callback)
  File "/home/avgusr/env/lib/python3.8/site-packages/onvif/client.py", line 140, in call
    ret = func(**params)
  File "/home/avgusr/env/lib/python3.8/site-packages/zeep/proxy.py", line 46, in __call__
    return self._proxy._binding.send(
  File "/home/avgusr/env/lib/python3.8/site-packages/zeep/wsdl/bindings/soap.py", line 135, in send
    return self.process_reply(client, operation_obj, response)
  File "/home/avgusr/env/lib/python3.8/site-packages/zeep/wsdl/bindings/soap.py", line 229, in process_reply
    return self.process_error(doc, operation)
  File "/home/avgusr/env/lib/python3.8/site-packages/zeep/wsdl/bindings/soap.py", line 391, in process_error
    raise Fault(
zeep.exceptions.Fault: Sender not authorized

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "onviftest.py", line 2, in <module>
    mycam = ONVIFCamera('192.168.0.101', 80, 'user', 'password', wsdl_dir='/home/avgusr/env/lib/python3.8/site-packages/wsdl/')
  File "/home/avgusr/env/lib/python3.8/site-packages/onvif/client.py", line 216, in __init__
    self.update_xaddrs()
  File "/home/avgusr/env/lib/python3.8/site-packages/onvif/client.py", line 233, in update_xaddrs
    capabilities = self.devicemgmt.GetCapabilities({'Category': 'All'})
  File "/home/avgusr/env/lib/python3.8/site-packages/onvif/client.py", line 26, in wrapped
    raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: Sender not authorized```

What could be wrong? 

AmbarishGK1 avatar Dec 28 '21 07:12 AmbarishGK1

problem: onvif.exceptions.ONVIFError: Unknown error: Sender not authorized
I have the same problem, how can I solve it? And I have enabled onvif and created a administrator user in my camera. Thank you~

lygoon avatar Feb 24 '22 08:02 lygoon

There are a few things I had to do, not sure which solved them.

  1. Update to the latest firmware
  2. create admin ONVIF user in the axis device
  3. Enable Webservices (this I think solved it) Try these out; It should work.

AmbarishGK1 avatar Feb 24 '22 09:02 AmbarishGK1

Thanks for your reply. As for the answer 1 & 2, I think I have done. But I cannot understand the answer 3 completely. Should I try it on the Axis device or in my code? Thanks again.

lygoon avatar Feb 24 '22 11:02 lygoon

That should be done in the Axis device page after logging in as admin; You should disable the replay protection webservice

AmbarishGK1 avatar Feb 24 '22 12:02 AmbarishGK1

Oh, it works!!! Although the interface is different from yours, I found it and disabled the replay protection. I am so happy, because it has troubled me for a few days. Thank you very very much! However, another problem occurred: onvif.exceptions.ONVIFError: Unknown error: No such space The detailed information is showed below:

no_such_space

Do you know How can I solve it? Thanks.

lygoon avatar Feb 24 '22 12:02 lygoon

I have not come across this error @lygoon

AmbarishGK1 avatar Mar 02 '22 11:03 AmbarishGK1