jbaiter / gphoto2-cffi

Python bindings for libgphoto2 with an idiomatic API
GNU Lesser General Public License v3.0
37 stars 16 forks source link

capture() does not work on Sony a7r3 #31

Open chubun opened 4 years ago

chubun commented 4 years ago

I tried the sample code on a Sony a7r3:

import gphoto2cffi as gp my_cam = gp.Camera() imgdata = my_cam.capture()

And get the following error:

Traceback (most recent call last): File "", line 1, in File "/home/installer/.local/lib/python3.6/site-packages/gphoto2cffi/gphoto2.py", line 105, in wrapped rval = meth(self, *args, **kwargs) File "/home/installer/.local/lib/python3.6/site-packages/gphoto2cffi/gphoto2.py", line 716, in capture target = self.config['settings']['capturetarget'] KeyError: 'capturetarget'

In the debugger:

len(my_cam.config['settings']) 0

By the way, the output from gphoto2 --list-config does not show a "/main/settings" section, only "/main/capturesettings/", "/main/actions/", ...

However, I have no problems capturing images using gphoto2 or python-gphoto2.