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

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

Open gene-code opened this issue 4 years ago • 1 comments

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 avatar Apr 01 '21 02:04 gene-code

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.

gene-code avatar Apr 01 '21 03:04 gene-code