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.exceptions.ONVIFError: Unknown error: No such file: /usr/local/lib/python2.7/dist-packages/wsdl/devicemgmt.wsdl' #13

Open tringler opened 6 years ago

tringler commented 6 years ago

Hello,

if I try to call mycam = ONVIFCamera('192.168.1.100', 80, 'admin', 'admin) I get No such file: /usr/local/lib/python2.7/dist-packages/wsdl/devicemgmt.wsdl' - If I understand it correctly the wsdl files should be included in the PyPi package right?

If I download the wsdl files manually and add it to the call it works as expected.

Thanks in Advance!

tringler commented 6 years ago

It went out that the files are stored in usr/local/wsdl/ - It is a bug in the Code or a bug in the PyPi package?

PhenomenalOnee commented 3 years ago

ADD this parameter in class initialization for OnvifCamera wsdl_dir='/usr/local/lib/python3.6/site-packages/wsdl Screenshot from 2020-09-21 12-11-27

scottlamb commented 3 years ago

When I install python-onvif-zeep v0.2.12 from source as described in the README, eg

git checkout v0.2.12
python3 setup.py install

it installs these files:

and instantiating an ONVIFCamera works without specifying a wsdl_dir parameter.

When I instead use pip3 install onvif_zeep (which downloads the latest version, v0.2.12, from pypi) similar to what's described slightly lower in the README, it installs these files:

and instantiating an ONVIFCamera fails unless I override wsdl_dir. It tries to open /usr/local/lib/python3.8/dist-packages/wsdl/devicemgmt.wsdl, which doesn't exist.

I suspect this is pretty easy to fix (this guide suggests using package_data rather than data_files) but I'm not sure how to test it. I don't know how to get the pip-like installation without actually uploading something to pypi. I tried pip3 install . and it did the same thing as python3 setup.py install. Help, anyone?