gphoto4ruby icon indicating copy to clipboard operation
gphoto4ruby copied to clipboard

.capture errors out (canon 40d)

Open ciapecki opened this issue 14 years ago • 3 comments

here is the output of running example.rb is it something that can be fixed?

is it possible to have a live view with your wrapper (same as gtkam has while clicking on Capture Image... from the left pane)

thanks, chris

chris@chris-ub:~/staging/ruby/gphoto$ ruby -v ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02 chris@chris-ub:~/staging/ruby/gphoto$ ruby example.rb 1cameras connected camera in port: usb:002,018 whitebalancexb value is: 0 values available are: [] whitebalanceadjusta value is: 0 values available are: ["-9", "-8", "-7", "-6", "-5", "-4", "-3", "-2", "-1", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] imageformat value is: Small Fine JPEG values available are: ["Large Fine JPEG", "Large Normal JPEG", "Medium Fine JPEG", "Medium Normal JPEG", "Small Fine JPEG", "Small Normal JPEG", "RAW + Large Fine JPEG", "RAW + Large Normal JPEG", "RAW + Medium Fine JPEG", "RAW + Medium Normal JPEG", "RAW + Small Fine JPEG", "RAW + Small Normal JPEG", "sRAW2 + Large Fine JPEG", "sRAW2 + Large Normal JPEG", "sRAW2 + Medium Fine JPEG", "sRAW2 + Medium Normal JPEG", "sRAW2 + Small Fine JPEG", "sRAW2 + Small Normal JPEG", "RAW", "sRAW2"] model value is: 2147484048 values available are: [] syncdatetime value is: false values available are: [true, false] imageformatcf value is: Small Fine JPEG values available are: ["Large Fine JPEG", "Large Normal JPEG", "Medium Fine JPEG", "Medium Normal JPEG", "Small Fine JPEG", "Small Normal JPEG", "RAW + Large Fine JPEG", "RAW + Large Normal JPEG", "RAW + Medium Fine JPEG", "RAW + Medium Normal JPEG", "RAW + Small Fine JPEG", "RAW + Small Normal JPEG", "sRAW2 + Large Fine JPEG", "sRAW2 + Large Normal JPEG", "sRAW2 + Medium Fine JPEG", "sRAW2 + Medium Normal JPEG", "sRAW2 + Small Fine JPEG", "sRAW2 + Small Normal JPEG", "RAW", "sRAW2"] d406 value is: Unknown Initiator values available are: [] bracketmode value is: 0 values available are: [] whitebalanceadjustb value is: 0 values available are: ["-9", "-8", "-7", "-6", "-5", "-4", "-3", "-2", "-1", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] imageformatexthd value is: Small Fine JPEG values available are: ["Large Fine JPEG", "Large Normal JPEG", "Medium Fine JPEG", "Medium Normal JPEG", "Small Fine JPEG", "Small Normal JPEG", "RAW + Large Fine JPEG", "RAW + Large Normal JPEG", "RAW + Medium Fine JPEG", "RAW + Medium Normal JPEG", "RAW + Small Fine JPEG", "RAW + Small Normal JPEG", "sRAW2 + Large Fine JPEG", "sRAW2 + Large Normal JPEG", "sRAW2 + Medium Fine JPEG", "sRAW2 + Medium Normal JPEG", "sRAW2 + Small Fine JPEG", "sRAW2 + Small Normal JPEG", "RAW", "sRAW2"] d407 value is: 1 values available are: [] exposurecompensation value is: 0 values available are: ["-2", "-1.6", "-1.3", "-1.0", "-0.6", "-0.3", "0", "0.3", "0.6", "1.0", "1.3", "1.6", "2"] batterylevel value is: Low values available are: [] dpofversion value is: 257 values available are: [] ptpversion value is: 256 values available are: [] capturetarget value is: Internal RAM values available are: ["Internal RAM", "Memory card"] manualfocusdrive value is: None values available are: ["Near 1", "Near 2", "Near 3", "None", "Far 1", "Far 2", "Far 3"] iso value is: 1250 values available are: ["Auto", "100", "125", "160", "200", "250", "320", "400", "500", "640", "800", "1000", "1250", "1600", "3200"] autofocusdrive value is: false values available are: [true, false] meteringmode value is: evaluative values available are: ["evaluative", "partial", "spot", "center-weighted average"] drivemode value is: Single values available are: ["Single", "Continuous high speed", "Continuous low speed", "Timer 2 sec", "Timer 10 sec"] availableshots value is: 5666181 values available are: [] shuttercounter value is: 13453 values available are: [] capture value is: false values available are: [true, false] d402 value is: Canon EOS 40D values available are: [] aperture value is: 7.1 values available are: ["4.5", "5", "5.6", "6.3", "7.1", "8", "9", "10", "11", "13", "14", "16", "18", "20", "22", "25", "29"] serialnumber value is: 1330720500 values available are: [] reviewtime value is: 2 seconds values available are: ["None", "2 seconds", "4 seconds", "8 seconds", "Hold"] datetime value is: Tue Dec 21 13:08:44 UTC 2010 values available are: [] bulb value is: false values available are: [true, false] picturestyle value is: Standard values available are: ["Standard", "Portrait", "Landscape", "Neutral", "Faithful", "Monochrome", "User defined 1", "User defined 2", "User defined 3"] whitebalancexa value is: 0 values available are: [] whitebalance value is: Fluorescent values available are: ["Auto", "Daylight", "Shadow", "Cloudy", "Tungsten", "Fluorescent", "Flash", "Manual", "Color Temperature"] ownername value is: values available are: [] example.rb:20:in `capture': LibGPhoto2 function returned: Unspecified error (GPhoto2::Exception) from example.rb:20

ciapecki avatar Dec 21 '10 12:12 ciapecki

do you have gphoto2 command line tool installed? can you run "gphoto2 --capture-image" or "gphoto2 --capture-image-and-download" or "gphoto2 --capture-preview"?

Is your focus mode set to manual or auto?

lonelyelk avatar Dec 23 '10 17:12 lonelyelk

all these commands work fine from command line: chris@chris-ub:~$ gphoto2 --capture-image-and-download New file is in location /capt0000.jpg on the camera
Saving file as capt0000.jpg Deleting file /capt0000.jpg on the camera Deleting 'capt0000.jpg' from folder '/'... New file is in location /capt0000.cr2 on the camera
Saving file as capt0000.cr2 Deleting file /capt0000.cr2 on the camera Deleting 'capt0000.cr2' from folder '/'... chris@chris-ub:~$ gqview capt0000.jpg This is a compatibility alias for Geeqie! Please use /usr/bin/geeqie instead! Geeqie 1.0beta2, This is an alpha release. Desktop file '/usr/share/applications/darktable.desktop' should not include extension in Icon key: 'darktable.png' Desktop file '/usr/share/applications/ufraw.desktop' should not include extension in Icon key: 'ufraw.png' Desktop file '/usr/share/applications/gtkam.desktop' should not include extension in Icon key: 'gtkam-camera.png' Could not init LIRC support

chris@chris-ub:~$ gphoto2 --capture-preview Saving file as preview.jpg

chris@chris-ub:~$ gqview preview.jpg This is a compatibility alias for Geeqie! Please use /usr/bin/geeqie instead! Geeqie 1.0beta2, This is an alpha release. Desktop file '/usr/share/applications/darktable.desktop' should not include extension in Icon key: 'darktable.png' Desktop file '/usr/share/applications/ufraw.desktop' should not include extension in Icon key: 'ufraw.png' Desktop file '/usr/share/applications/gtkam.desktop' should not include extension in Icon key: 'gtkam-camera.png' Could not init LIRC support chris@chris-ub:~$ gphoto2 --capture-image New file is in location /capt0000.jpg on the camera
New file is in location /capt0000.cr2 on the camera

and the pictures can be found on disk.

ruby example.rb returns though: example.rb:20:in `capture': LibGPhoto2 function returned: Unspecified error (GPhoto2::Exception) from example.rb:20

chris

ciapecki avatar Dec 23 '10 19:12 ciapecki

I also get the same exception with Canon 450D. I am able to capture without an issue using the ffi-gphoto2 gem too.

whistler avatar Nov 30 '14 21:11 whistler