Re: Error when downloading image directly from memory card
Marcus Meissner <[email protected]> Sat, 20 Nov 2021 16:03:24 +0100
| Newsgroups | gmane.comp.multimedia.gphoto.user |
|---|---|
| Message-ID | <YZkOPCUAdposgtXK@jet> |
Hi, It is actually a more interesting problem... If we switch the camera to application mode, it no longer returns a filesystem. $ gphoto2 --set-config applicationmode=1 --wait-event=1s -L Waiting for 1 seconds for events from camera. Press Ctrl-C to abort. UNKNOWN PTP StoreRemoved, Param1 00010001 There is no file in folder '/'. $ The storage is "semi visible", e.g. if we access the filehandle from the "changed" event, it can be accessed. But as the filesystem does not see the storage in the storageids index, it cannot find the right path. I need to think a bit on how to handle this... :/ (A workaround would be on receipt of "file changed" to switch off application mode, wait for the StoreAdded event, get the file, switch on application mode, and go back to polling.) Ciao, Marcus On Tue, Nov 16, 2021 at 06:40:13PM +0100, Marcus Meissner wrote: > Hi, > > There probably is a bug in the dynamic fileyystem ifc this shows up, I > am currently travelling, perhaps I can reproduce and take a look at this > on Thursday. > > Ciao, Marcus > On Sun, Nov 14, 2021 at 05:16:03PM +0100, Peter Sonander wrote: > > Hi > > > > I have created a small C program which is waiting for the file changed event > > and if the file has been write protected it is download to my computer. This > > works if I first take a new photo by pressing the shutter button, but not if > > I start the program and directly protects an image. > > > > When I take the first photo with the program started it looks like there is > > a file system built as a part of the file added event, but this does not > > happen when the file changed event is happening. How can I make the > > filesystem build to happen either on connection established or when I want > > to download a photo? > > > > This is the debug trace when trying to download a photo without first have > > captured an image during the session > > > > nikon eventex 0: code 0x4007, params 1 > > event.Code is 4007 / param 921076e > > Sending PTP_OC 0x1008 (Get object info) (0x921076e) request... > > Reading PTP_OC 0x1008 (Get object info) data... > > Reading PTP_OC 0x1008 (Get object info) response... > > (10001,11210000,/store_00010001/) > > Sending PTP_OC 0x1008 (Get object info) (0x11210000) request... > > Reading PTP_OC 0x1008 (Get object info) data... > > Reading PTP_OC 0x1008 (Get object info) response... > > (10001,11004000,/store_00010001/) > > Sending PTP_OC 0x1008 (Get object info) (0x11004000) request... > > Reading PTP_OC 0x1008 (Get object info) data... > > Reading PTP_OC 0x1008 (Get object info) response... > > (10001,0,/store_00010001/) > > resetting filesystem > > Clearing fscache LRU list... > > fscache LRU list already empty > > Internally deleting all folders from '/'... > > Lookup folder '/'... > > Found! / is 0x1f08468 > > Recurse delete folder 0x1f08468// > > Delete all files in folder 0x1f08468// > > Lookup folder /store_00010001/DCIM/132ND500 file D50_1902.NEF > > Lookup folder '/store_00010001/DCIM/132ND500'... > > Folder / is dirty. Listing folders in there to make folder clean... > > Listing folders in / > > Lookup folder '/'... > > Found! / is 0x1f08468 > > ... is dirty, getting from camera > > folder_list_func(/) > > Internally deleting all folders from '/'... > > Lookup folder '/'... > > Found! / is 0x1f08468 > > Recurse delete folder 0x1f08468// > > Folder / contains 0 subfolders. > > Done making folder / clean... > > File changed on camera: /store_00010001/DCIM/132ND500 / D50_1902.NEF > > Getting file info for 'D50_1902.NEF' in '/store_00010001/DCIM/132ND500'... > > Getting information about 'D50_1902.NEF' in > > '/store_00010001/DCIM/132ND500'... > > Lookup folder /store_00010001/DCIM/132ND500 file D50_1902.NEF > > Lookup folder '/store_00010001/DCIM/132ND500'... > > Downloading ./images/D50_1902.NEF > > Getting file 'D50_1902.NEF' in folder '/store_00010001/DCIM/132ND500'... > > Getting file 'D50_1902.NEF' from folder '/store_00010001/DCIM/132ND500' > > (type 1)... > > Lookup folder /store_00010001/DCIM/132ND500 file D50_1902.NEF > > Lookup folder '/store_00010001/DCIM/132ND500'... > > Download of 'D50_1902.NEF' from '/store_00010001/DCIM/132ND500' (type 1) > > failed. Reason: 'Directory not found' > > 'gp_filesystem_get_file (camera->fs, folder, file, type, camera_file, > > context)' failed: -107 > > Failed to download ./images/D50_1902.NEF > > > > Thanks for the support > > > > -- > > Med vänlig hälsning > > Peter Sonander > > S-Bilder > > [email protected] > > > > http://s-bilder.se > > Facebook: https://fb.me/sbilder.se/ > > Instagram: @FotografPeterSonander > > > > _______________________________________________ > > Gphoto-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/gphoto-user > > > > _______________________________________________ > Gphoto-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gphoto-user