Re: No able to use "--delete-all-files" from python from RPi

Marcus Meissner <[email protected]>
Newsgroups gmane.comp.multimedia.gphoto.user
Message-ID <[email protected]>
On Thu, Jul 13, 2017 at 03:19:43PM -0700, citterly wrote:
> Hi there,
> I'm hobbiest and just learning python as part of making a 3d scanner. My
> code to operate the stepper motor is sorted and working well and I almost
> have all my camera operations done too. I've had success with the functions
> --> --trigger-capture  --get-all-files  
> Code as follows:
>     call(["gphoto2", "--trigger-capture")
>     call(["gphoto2", "--get-all-files")
> 
> The problem I'm having is using the --delete-all-files function from the
> python code.
> When using the command line, the following executes successfully:
> gphoto2 --delete-all-files --folder '/store_00010001/DCIM/101D3400'
> 
> Although, when executing the following:
>     call(["gphoto2", "--delete-all-files", "--folder
> '/store_00010001/DCIM/101D3400'"])
> 
> It just skips that line of code and the files remain on the SD card.
> My camera is a Nikon D3400.

You probably need to pass the folder parameter as two parameters, like e.g. this:

call(["gphoto2", "--delete-all-files", "--folder", "/store_00010001/DCIM/101D3400"])

or as one but with = sign:

call(["gphoto2", "--delete-all-files", "--folder=/store_00010001/DCIM/101D3400"])

Ciao, Marcus

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.