[go: nahoru, domu]

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

gphoto2 exiting after error with error code=0 #98

Open
inquito opened this issue Oct 6, 2016 · 1 comment
Open

gphoto2 exiting after error with error code=0 #98

inquito opened this issue Oct 6, 2016 · 1 comment

Comments

@inquito
Copy link
inquito commented Oct 6, 2016

Hello again, Marcus.
I'm having a problem with gphoto2, I'm using it in a arm machine with this version:
gphoto2 2.5.10 gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
libgphoto2 2.5.10 all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0 gcc, ltdl, USB, serial without locking

the problem consist in that when I attempt to take a photo and capturing fails the exit error code of gphoto2 is always 0
if I execute
#!/bin/bash
/usr/local/bin/gphoto2 --capture-image-and-download
Error_gphoto=$?
echo "-------error_gphoto = (" $Error_gphoto ")"
``
I get ....
.
.
.
ERROR: Could not capture image.
ERROR: Could not capture.
*** Error ***
An error occurred in the io-library ('Could not lock the device'): Camera is already in use.
-------error_gphoto = (0)
or ....
.
.
*** Error ***
An error occurred in the io-library ('Could not lock the device'): Camera is already in use.
*** Error (-60: 'Could not lock the device') ***
-------error_gphoto(0)

am I doing something wrong ?. Any idea on how to detect when a error happens in gphoto2 by other method ?
I have been using this method from long time ago and I think that is something new in 2.5.10, I'm not sure but I think that it was working fine until I upgraded.
Best regards.
Inco.

msmeissn added a commit to gphoto/gphoto2 that referenced this issue Oct 10, 2016
@msmeissn
Copy link
Contributor

hmm, the capture method returns OK on this kind of error currently, but it probably should return a failure.

the gphoto2 exit code handling is not always consistent.

I will handle "camera in use"

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

2 participants