gphoto / libgphoto2

The libgphoto2 camera access and control library.
GNU Lesser General Public License v2.1
1.02k stars 323 forks source link

gphoto2 commandline errors on second time call onwards #305

Open tinkyawoo opened 6 years ago

tinkyawoo commented 6 years ago

Hi

I can give any command for the first time gphoto2 --summary (OK) from then on. whatever command I gave throws error "Unexpected"...

So, I am trying to use gphoto2 --shell mode. The problem is, i need to retrieve camera model and storage info for Model, Free Space on SD card etc, but --shell mode do not have command to get --summary and --storage-info command.

Any help?

msmeissn commented 6 years ago

what camera is it? can you capture a debuglogfile of the first and second run?

tinkyawoo commented 6 years ago

I am already rewriting my code to use gphoto2 --shell mode. Is there any way I could get camera StorageInfo in --shell mode? I can get storage info with --storage-info in "gphoto2 --storage-info --shell" , but that is for before capturing the image. But, I need to get storage-info for every capture-image command I do in --shell mode. Is there anyway that I can get this info?

msmeissn commented 6 years ago

currently thats not possible, it would need to be added to shell mode

tinkyawoo commented 6 years ago

hmm.... anyway thanks, I am writing a wrapper to get storage-info before taking capture, and get image size from exif and deduct it from initial storage-info. If we could get that available in shell mode would be really handy for interactive scripting without leaving shell and avoid usb connection lockup issue like in my initial problem which work first time and failed for sub-sequence gphoto2 cli commands