Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: 'onvif.exceptions.ONVIFError: Unknown error: No such file: /usr/local/lib/python2.7/dist-packages/wsdl/devicemgmt.wsdl' #13

Open
tringler opened this issue Dec 11, 2017 · 3 comments

Comments

@tringler
Copy link

tringler commented Dec 11, 2017

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
Copy link
Author

tringler commented Dec 12, 2017

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
Copy link

PhenomenalOnee commented Sep 21, 2020

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
Copy link

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:

  • /usr/local/lib/python3.8/dist-packages/onvif_zeep-0.2.12-py3.8.egg/onvif/client.py
  • /usr/local/lib/python3.8/dist-packages/onvif_zeep-0.2.12-py3.8.egg/lib/python3.8/site-packages/wsdl/devicemgmt.wsdl

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:

  • /usr/local/lib/python3.8/dist-packages/onvif/client.py
  • /usr/local/lib/python3.8/site-packages/wsdl/devicemgmt.wsdl

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants