smartsenselab / sensecam-control

MIT License
45 stars 26 forks source link

'CameraControl' object has no attribute 'camera_ptz' #10

Open kindofausername opened 3 years ago

kindofausername commented 3 years ago

Hello PTZ-Fans,

I tried running your package example code but run into following error:

Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 20:33:18) [Clang 11.1.0 ] on darwin Type "help", "copyright", "credits" or "license" for more information.

IP = "192.168.178.52" # Camera IP address

PORT = 8080 # Port USER = "admin" # Username PASS = "admin" # Password from sensecam_control import onvif_control Camera2 = onvif_control.CameraControl(IP, USER, PASS) Camera2.absolute_move(0.02, 0.60, 0.0) Traceback (most recent call last): File "", line 1, in File "/Users/mymac/anaconda3/envs/onvif39/lib/python3.9/site-packages/sensecam_control/onvif_control.py", line 64, in absolute_move request = self.camera_ptz.create_type('AbsoluteMove') AttributeError: 'CameraControl' object has no attribute 'camera_ptz'

Any idea how to get my cam working?

Greetings, Armin

wiseman commented 2 years ago

I ran into this same issue. I notice that the onvif control example only uses relative_move, not absolute_move.

wiseman commented 2 years ago

Oh, I think you need to call camera_start() before calling a move method.