Open P4in69 opened 7 years ago
It seems to be that the Suds Libary have problems to create repr.
Unable to get repr for suds.plugin.PluginContainer
Any Ideas?
I am facing the same issue; camera's working well with ONVIF Device Manager but the same exception in the ONIFCamera constructor...
I tried it now also on an Linux (Ubuntu) platform, same issue :(
I got it, the released Version is older than the Version on GitHub. Download Zip and install via cmd and pip.
Indeed, this fixes this particular issue. Thanks
Fresh package just installed via pip
fails to communicate with quite ugly message:
jno@jno-intra:~$ onvif-cli -v -u root -a PxxxD --host 172.17.16.101 --port 80 \
--wsdl /usr/local/wsdl devicemgmt GetWsdlUrl
Traceback (most recent call last):
File "/usr/local/bin/onvif-cli", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/onvif/cli.py", line 160, in main
cli.setup(args)
File "/usr/local/lib/python2.7/dist-packages/onvif/cli.py", line 39, in setup
args.wsdl, encrypt=args.encrypt)
File "/usr/local/lib/python2.7/dist-packages/onvif/client.py", line 227, in __init__
self.update_xaddrs()
File "/usr/local/lib/python2.7/dist-packages/onvif/client.py", line 237, in update_xaddrs
services = self.devicemgmt.GetServices({'IncludeCapability': False})
File "/usr/local/lib/python2.7/dist-packages/onvif/client.py", line 31, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: (400, u'Bad Request')
The cam is in its place:
jno@jno-intra:~$ echo 'quit' | nc -v 172.17.16.101 21
Connection to 172.17.16.101 21 port [tcp/ftp] succeeded!
220 AXIS P1214-E Network Camera 5.40.12.1 (2013) ready.
221 Goodbye.
Where to look at?
Even fresher install (git clone
+ build + install) does just the same.
Screenshot of web browser window depicting ONVIF enablement:
change of encrypt=True
to encrypt=False
doesn't help too
And, yes, the cam do have those .wsdl
files and they are accessible:
jno@jno-intra:~$ curl -vvv http://172.17.16.101/wsdl/onvif/ptz.wsdl
* Trying 172.17.16.101...
Connected to 172.17.16.101 (172.17.16.101) port 80 (#0)
> GET /wsdl/onvif/ptz.wsdl HTTP/1.1
> Host: 172.17.16.101
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 29 Nov 2016 15:14:56 GMT
< Accept-Ranges: bytes
< Connection: close
< Content-Length: 27255
< Last-Modified: Wed, 04 Apr 2012 08:39:02 GMT
< Content-Type: text/plain
<
...27K bytes of XML...
Oooops.
this cannot be used on AXIS camera
:(
I could connect to my onvif device with the ONVIF Device Manager , but i couldn't connect with the python modul. I already checked the time on webserver and PC. I also tried diffrent users.
When i activate basic authentication mode i'll get this Traceback:
Traceback (most recent call last): File "C:/Users/IRMonitor/PycharmProjects/untitled/Onvif test.py", line 4, in <module> mycam = ONVIFCamera('192.168.1.100', '80', 'admin', 'admin') File "C:\Users\IRMonitor\AppData\Roaming\Python\Python27\site-packages\onvif\client.py", line 227, in __init__ self.update_xaddrs() File "C:\Users\IRMonitor\AppData\Roaming\Python\Python27\site-packages\onvif\client.py", line 237, in update_xaddrs services = self.devicemgmt.GetServices({'IncludeCapability': False}) File "C:\Users\IRMonitor\AppData\Roaming\Python\Python27\site-packages\onvif\client.py", line 31, in wrapped raise ONVIFError(err) onvif.exceptions.ONVIFError: Unknown error: (401, u'Authentication required.')
When i activate digest authentication mode i'll get this traceback:Traceback (most recent call last): File "C:/Users/IRMonitor/PycharmProjects/untitled/Onvif test.py", line 4, in <module> mycam = ONVIFCamera('192.168.1.100', '80', 'admin', 'admin') File "C:\Users\IRMonitor\AppData\Roaming\Python\Python27\site-packages\onvif\client.py", line 227, in __init__ self.update_xaddrs() File "C:\Users\IRMonitor\AppData\Roaming\Python\Python27\site-packages\onvif\client.py", line 237, in update_xaddrs services = self.devicemgmt.GetServices({'IncludeCapability': False}) File "C:\Users\IRMonitor\AppData\Roaming\Python\Python27\site-packages\onvif\client.py", line 31, in wrapped raise ONVIFError(err) onvif.exceptions.ONVIFError: Unknown error: (400, u'BadRequest')
Can someone tell me why the authentication fails? Operating System: Windows 7 Pycharm Python 2.7