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
428 stars 140 forks source link

ERROR:onvif:Unexcept service type #5

Closed codegastudio closed 6 years ago

codegastudio commented 7 years ago

Hello,

After install thanks to

pip install --upgrade https://github.com/FalkTannhaeuser/python-onvif-zeep/archive/zeep.zip

I try to use your project but i get an error when i instantiate ONVIFCamera.

mycam = ONVIFCamera('ip', port, 'user', 'pass', '/path/to/wsdl/')
ERROR:onvif:Unexcept service type
Traceback (most recent call last):
  File "/path/lib/python3.4/site-packages/onvif/client.py", line 266, in update_xaddrs
    self.xaddrs[ns] = capability['XAddr']
TypeError: 'NoneType' object is not subscriptable

Regards

CodyDeGhetto commented 6 years ago

Same issue here as above.

Thanks

FalkTannhaeuser commented 6 years ago

As I explained in another issue, when using Anaconda (at least under Windows), it is recommended to move the WSDL directory created during installation from e.g. C:\ProgramData\Anaconda3\wsdl manually to C:\ProgramData\Anaconda3\Lib\site-packages\wsdl (when using the root environment of Anaconda) respectively from C:\ProgramData\Anaconda3\envs\<<<your Python env>>>\wsdl to C:\ProgramData\Anaconda3\envs\<<<your Python env>>>\Lib\site-packages\wsdl (when using a virtual environment). Yes, this should be explained in the installation instructions, or even better it should be fixed in the setup files... After this, it should not longer be necessary to pass the 5th argument '/path/to/wsdl/' to the ONVIFCamera initialization. Furthermore, the same questions as in said issue:

CodyDeGhetto commented 6 years ago

Geovision GV-EBD4700 and GV-ABL1300

I have not tried using Python 2.7 yet. When I have time I will test it out.

Thank you.

FalkTannhaeuser commented 6 years ago

The commit 22f569e5447935f575fee7a0bdfb574264c755b1 should fix this warning.