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

AttributeError: 'CameraControl' object has no attribute 'camera_ptz' #3

Open
canozcivelek opened this issue Aug 25, 2020 · 3 comments

Comments

@canozcivelek
Copy link

Hi,

I'm trying to access the zoom control of my Onvif enabled IP camera. I'm trying to execute example.py but with onvif_control instead of vapix_control. I added:
elif k == ord('z') or k == ord('Z'):
X.relative_move(None, None, 0.5)
Lines so when I press 'z', it would zoom in. However I'm facing an error when pressing 'Z', AttributeError: 'CameraControl' object has no attribute 'camera_ptz' error is given. I'm relatively new to onvif so can you help me out on how I can control the camera zoom function.

Thanks!

@igorhenriquedias94
Copy link
Collaborator

I apologize for the delay in the solution.

To control the camera using ONVIF it is necessary to start the camera manually with the code line X.camera_start (), so the camera options are initialized.
I will add another example file with this initialization and the zoom control which you want to use. None values are not accepted by the library (I will modify this soon, so I ask you to assign values as zero).

Any problem can report to me, I was absent in the updates of the library but I will be attentive to new questions.

@canozcivelek
Copy link
Author

Thank you very much for getting back. I will give it a try, and please let me know when you are able to add examples with ONVIF zoom control.

Best.

@rhettplace
Copy link

I added the "X.camera_start()" call immediately after the onvif_control.CameraControl call and got, "Unknown error: No such file: //Library/Python/3.7/lib/python/site-packages/wsdl/devicemgmt.wsdl".

So, is there .wsdl management required?

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