quatanium / python-onvif

ONVIF Client Implementation in Python
MIT License
470 stars 312 forks source link

Unknown error: (400, u'Bad Request') with Axis P7214 #9

Open tetherit opened 9 years ago

tetherit commented 9 years ago

I enabled ONVIF and set up a user account for full admin rights on an Axis P7214 IP encoder, when I try to connect however I see:

mycam = ONVIFCamera('192.168.88.12', 80, 'root', 'password', '/etc/onvif/wsdl/')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "onvif/client.py", line 225, in __init__
    self.update_xaddrs()
  File "onvif/client.py", line 235, in update_xaddrs
    services = self.devicemgmt.GetServices({'IncludeCapability': False})
  File "onvif/client.py", line 30, in wrapped
    raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: (400, u'Bad Request')

Any ideas?

fernandoaguilar commented 9 years ago

I have the same issue and i think it might be because of a bad security token. Im currently looking into it.

Edit: I fixed my issue. The problem was that the time on the camera was not correct. So, this caused the authentication to fail and I was receiving a 400 for some reason.