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
445 stars 145 forks source link

File "/datastore/genecode/env1/lib/python3.5/site-packages/zeep-4.0.0-py3.5.egg/zeep/xsd/valueobjects.py", line 83 _xsd_type: "ComplexType" ^ SyntaxError: invalid syntax #77

Open gene-code opened 3 years ago

gene-code commented 3 years ago

Hi am using Python 3.5.2 Installed zeep using cmd line python setup.py install.

My testonvif.py code:

from onvif import ONVIFCamera

mycam = ONVIFCamera('192.168.0.51', 80, 'nodered', 'test1234', '/etc/onvif/wsdl/')

The error is syntax: from zeep.xsd.valueobjects import AnyObject File "/datastore/genecode/env1/lib/python3.5/site-packages/zeep-4.0.0-py3.5.egg/zeep/xsd/valueobjects.py", line 83 _xsd_type: "ComplexType" ^ SyntaxError: invalid syntax

What could possibly be the issue?

EDIT: I noticed there is no /etc/onvif folder. But install script did not mention any error when installing. Can I specify the wdsl folder in the downloaded repo?

gene-code commented 3 years ago

Got it to work. I uninstalled zeep and onvif-zeep.

Then reinstall using python3 -m pip install onvif-zeep.

After that, i use command in python file: mycam = ONVIFCamera('192.168.0.51', 80, 'nodered', 'test1234', '/home/nvidia/python-onvif-zeep-zeep/wsdl')

No more error occuring. Just sharing in case someone else facing the same issue.