gphoto2 issues with Canon 760D

I’m trying to use libgphoto2 python bindings ( to write a camera automation script for my 760D camera, that I intend to run on a Raspberry Pi (to do things like focus stacking, HDR with more than 3 images etc.).

I started the project last year, but was prevented from proceeding by a fault. Essentially, each time I tried to change a configuration setting or capture an image, the camera was pushed out of live view, the mirror dropped down, and a little picture of a computer appeared on the screen. Often this would also lead to the camera becoming unresponsive (a ‘busy’ message appearing when I tried to press a button). I raised an issue with the gphoto2 project ( but have so far not had any response.

A couple of days ago I thought I’d give it another go and miraculously everything seemed to be working fine… until it wasn’t. It seems that libgphoto2 only has problems operating my camera when an SD card is present. Without an SD card I don’t get any issues – everything works fine.

So, in the absence of a response to my issue, I’m hoping the community might be able to help:

  1. Does anyone have any idea if there might be a non-gphoto cause or resolution to this issue (pending a fix by the devs)? Some camera setting I’ve overlooked or something on my system that might be interfering with how gphoto is working?

  2. Is there any way to capture and download an image, using the python bindings, that will work without an SD card? As far as I can tell, you can only capture a preview image; a full raw capture has to save to the camera first.

Ok I’ve worked out that I can capture and download from the internal memory. I was getting an error because I was trying to retrieve the raw file using “GP_FILE_TYPE_RAW” (which seemed like the logical choice), then I read the docs and I’m now using “GP_FILE_TYPE_NORMAL”, which works.

So I’ve solved the second question. Anyone have any ideas how I can do this with the SD card in (and avoid having to download the images to my computer at all)?

Can you capture to the SD card using gphotos command line interface?

Yes, but each time I do anything I get thrown out of liveview. I have to change the target (/main/settings/capturetarget) to the SD card, then re-enter liveview, (on the camera) then capture, then re-enter liveview. The first time I changed the capturetarget the camera displayed the image of a PC and then I set it again, to get the normal (viewfinder) display back.